@raystack/frontier 0.96.2 → 0.97.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 +548 -602
- package/admin/dist/index.mjs +446 -501
- package/hooks/dist/index.d.ts +13 -0
- package/hooks/dist/index.js +33 -2
- package/hooks/dist/index.mjs +33 -3
- package/package.json +2 -2
- package/react/dist/index.d.ts +31 -2
- package/react/dist/index.js +4493 -916
- package/react/dist/index.mjs +4688 -906
package/admin/dist/index.js
CHANGED
|
@@ -232,8 +232,8 @@ function converBillingAddressToString(address) {
|
|
|
232
232
|
// admin/views/roles/columns.tsx
|
|
233
233
|
var import_apsara = require("@raystack/apsara");
|
|
234
234
|
|
|
235
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
236
|
-
var digest = "
|
|
235
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-IuFwi0pYxY9v/sdk/admin/views/roles/roles.module.css.js
|
|
236
|
+
var digest = "8deb3af6011662aedbd7b6dc085dd40ee34bae5487396ae19f777375d3a82267";
|
|
237
237
|
var css = `._tableRoot_4yb15_1 {
|
|
238
238
|
width: 100%;
|
|
239
239
|
}
|
|
@@ -318,8 +318,8 @@ var import_apsara3 = require("@raystack/apsara");
|
|
|
318
318
|
// admin/components/PageHeader.tsx
|
|
319
319
|
var import_apsara2 = require("@raystack/apsara");
|
|
320
320
|
|
|
321
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
322
|
-
var digest2 = "
|
|
321
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-kykj0fjeWMQh/sdk/admin/components/page-header.module.css.js
|
|
322
|
+
var digest2 = "9e0ce6c3d9e98c27ef688d2a740191b2dd47ea6b386689d8defcf8209bbb1821";
|
|
323
323
|
var css2 = `._breadcrumb_1kaun_1 {
|
|
324
324
|
list-style: none;
|
|
325
325
|
padding: 0;
|
|
@@ -425,8 +425,8 @@ function PageHeader({
|
|
|
425
425
|
);
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
429
|
-
var digest3 = "
|
|
428
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-9HrIJJpGmQC7/sdk/admin/views/roles/roles.module.css.js
|
|
429
|
+
var digest3 = "b65c65f4553b93744dcd22100463674d7fa4f4ed47c5b12f8d69e6854ac03698";
|
|
430
430
|
var css3 = `._tableRoot_4yb15_1 {
|
|
431
431
|
width: 100%;
|
|
432
432
|
}
|
|
@@ -912,8 +912,8 @@ function PageTitle({ title, appName }) {
|
|
|
912
912
|
return null;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
916
|
-
var digest4 = "
|
|
915
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-YYWxAOIOTwfZ/sdk/admin/views/roles/roles.module.css.js
|
|
916
|
+
var digest4 = "c8d5b74123e3a3abdd7fd1772686a84623658f5f7089fc95cf52773787e5551d";
|
|
917
917
|
var css4 = `._tableRoot_4yb15_1 {
|
|
918
918
|
width: 100%;
|
|
919
919
|
}
|
|
@@ -1091,8 +1091,8 @@ var import_react6 = require("react");
|
|
|
1091
1091
|
// admin/views/invoices/navbar.tsx
|
|
1092
1092
|
var import_apsara7 = require("@raystack/apsara");
|
|
1093
1093
|
|
|
1094
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1095
|
-
var digest5 = "
|
|
1094
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-t0DZqS4Xwjfp/sdk/admin/views/invoices/invoices.module.css.js
|
|
1095
|
+
var digest5 = "7dd77d4b3a3f3b814865680e86bd1232c6927bc5a19666d4dda82bb474d037a5";
|
|
1096
1096
|
var css5 = `._navbar_9c4wr_1 {
|
|
1097
1097
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
1098
1098
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1210,8 +1210,8 @@ var InvoicesNavabar = ({ searchQuery }) => {
|
|
|
1210
1210
|
] });
|
|
1211
1211
|
};
|
|
1212
1212
|
|
|
1213
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1214
|
-
var digest6 = "
|
|
1213
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-rn0CCfZCCsU1/sdk/admin/views/invoices/invoices.module.css.js
|
|
1214
|
+
var digest6 = "198f87dcc87754aa81a38a6cb789b32f379408076c4451616a286de61118bba1";
|
|
1215
1215
|
var css6 = `._navbar_9c4wr_1 {
|
|
1216
1216
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
1217
1217
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1757,8 +1757,8 @@ var getColumns3 = (onNavigateToPrices) => {
|
|
|
1757
1757
|
// admin/views/products/header.tsx
|
|
1758
1758
|
var import_apsara11 = require("@raystack/apsara");
|
|
1759
1759
|
|
|
1760
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1761
|
-
var digest7 = "
|
|
1760
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-WFhxR64tk517/sdk/admin/views/products/products.module.css.js
|
|
1761
|
+
var digest7 = "f8fa95fbdb5cb9d7f4a97bb88bf34ed3d0eaeb4a4a39b1c6677aeba1022abb17";
|
|
1762
1762
|
var css7 = `._tableRoot_1lzjd_1 {
|
|
1763
1763
|
width: 100%;
|
|
1764
1764
|
}
|
|
@@ -1829,8 +1829,8 @@ var ProductsHeader = ({
|
|
|
1829
1829
|
);
|
|
1830
1830
|
};
|
|
1831
1831
|
|
|
1832
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1833
|
-
var digest8 = "
|
|
1832
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-rpayGuBlCMn3/sdk/admin/views/products/products.module.css.js
|
|
1833
|
+
var digest8 = "4330eee1d592dc9c76c29277dd0fdc4ef3d0856aa132160c17d3cb86c87cea35";
|
|
1834
1834
|
var css8 = `._tableRoot_1lzjd_1 {
|
|
1835
1835
|
width: 100%;
|
|
1836
1836
|
}
|
|
@@ -1882,8 +1882,8 @@ var products_module_css_default2 = { "tableRoot": "_tableRoot_1lzjd_1", "tableWr
|
|
|
1882
1882
|
// admin/views/products/details.tsx
|
|
1883
1883
|
var import_apsara12 = require("@raystack/apsara");
|
|
1884
1884
|
|
|
1885
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1886
|
-
var digest9 = "
|
|
1885
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-jfHW29HdtqFu/sdk/admin/views/products/products.module.css.js
|
|
1886
|
+
var digest9 = "ff89e9f9954bfb83404ca39f40cb620aacb1372c0afe4156958a787678c40248";
|
|
1887
1887
|
var css9 = `._tableRoot_1lzjd_1 {
|
|
1888
1888
|
width: 100%;
|
|
1889
1889
|
}
|
|
@@ -2229,8 +2229,8 @@ function CpuChipIcon(props) {
|
|
|
2229
2229
|
);
|
|
2230
2230
|
}
|
|
2231
2231
|
|
|
2232
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2233
|
-
var digest10 = "
|
|
2232
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-eNHR5y8cWDOr/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2233
|
+
var digest10 = "40f2c1ccf6545135abe3d75d1941a331d3dfdafaee6ee06b5774c60105fe0d53";
|
|
2234
2234
|
var css10 = `._navbar_sfza7_1 {
|
|
2235
2235
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2236
2236
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2446,8 +2446,8 @@ var Navbar = ({ searchQuery, onExportCsv }) => {
|
|
|
2446
2446
|
};
|
|
2447
2447
|
var navbar_default = Navbar;
|
|
2448
2448
|
|
|
2449
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2450
|
-
var digest11 = "
|
|
2449
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-DkIMGPdZ1XMG/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2450
|
+
var digest11 = "3408b8c2cdf47540d6a5e0e12cb5e811eda9c5f57e5a7fc62fd4625644948b2e";
|
|
2451
2451
|
var css11 = `._navbar_sfza7_1 {
|
|
2452
2452
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2453
2453
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2557,8 +2557,8 @@ var audit_logs_module_css_default2 = { "navbar": "_navbar_sfza7_1", "table": "_t
|
|
|
2557
2557
|
var import_apsara18 = require("@raystack/apsara");
|
|
2558
2558
|
var import_dayjs3 = __toESM(require("dayjs"));
|
|
2559
2559
|
|
|
2560
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2561
|
-
var digest12 = "
|
|
2560
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-cJqY7MYUDjpl/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2561
|
+
var digest12 = "114d1c87d75552a638b5f0e5f894b55dc0e888902132271a093841329a00bb68";
|
|
2562
2562
|
var css12 = `._navbar_sfza7_1 {
|
|
2563
2563
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2564
2564
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2821,8 +2821,8 @@ var import_frontier7 = require("@raystack/proton/frontier");
|
|
|
2821
2821
|
var import_apsara22 = require("@raystack/apsara");
|
|
2822
2822
|
var import_apsara23 = require("@raystack/apsara");
|
|
2823
2823
|
|
|
2824
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2825
|
-
var digest13 = "
|
|
2824
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-vgMbVWayQ9vK/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2825
|
+
var digest13 = "12b5f83b191d7d5f627b154f48a42b0e041424647deda1702cb73bb7658f809d";
|
|
2826
2826
|
var css13 = `._navbar_sfza7_1 {
|
|
2827
2827
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2828
2828
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2959,8 +2959,8 @@ function MapIcon(props) {
|
|
|
2959
2959
|
// admin/views/audit-logs/sidepanel-log-dialog.tsx
|
|
2960
2960
|
var import_apsara19 = require("@raystack/apsara");
|
|
2961
2961
|
|
|
2962
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2963
|
-
var digest14 = "
|
|
2962
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-uLe86ls0wBbI/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2963
|
+
var digest14 = "059209270a731f4adfc66085ea33546323f042346f59c2b55b07296422190bc2";
|
|
2964
2964
|
var css14 = `._navbar_sfza7_1 {
|
|
2965
2965
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2966
2966
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3163,8 +3163,8 @@ function SidePanelLogDialog(props) {
|
|
|
3163
3163
|
// admin/views/audit-logs/sidepanel-list-link.tsx
|
|
3164
3164
|
var import_apsara20 = require("@raystack/apsara");
|
|
3165
3165
|
|
|
3166
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3167
|
-
var digest15 = "
|
|
3166
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-zjJL297vLJXk/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3167
|
+
var digest15 = "390a7faba03812ec9a5a9c3432973e82ae1bfa1ef2e518a93bea89709a64420f";
|
|
3168
3168
|
var css15 = `._navbar_sfza7_1 {
|
|
3169
3169
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3170
3170
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3305,8 +3305,8 @@ function SidepanelListItemLink({
|
|
|
3305
3305
|
// admin/views/audit-logs/sidepanel-list-id.tsx
|
|
3306
3306
|
var import_apsara21 = require("@raystack/apsara");
|
|
3307
3307
|
|
|
3308
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3309
|
-
var digest16 = "
|
|
3308
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-5c5HZHn67uDw/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3309
|
+
var digest16 = "f833e3d2c94ddbbcbdf7cb8f48ab3a5c2a1e4c2520ea3a009e5cf712215f9abc";
|
|
3310
3310
|
var css16 = `._navbar_sfza7_1 {
|
|
3311
3311
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3312
3312
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3872,8 +3872,8 @@ var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
|
|
|
3872
3872
|
];
|
|
3873
3873
|
};
|
|
3874
3874
|
|
|
3875
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3876
|
-
var digest17 = "
|
|
3875
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-716QIVrE2t7X/sdk/admin/views/admins/admins.module.css.js
|
|
3876
|
+
var digest17 = "2797b0a3b97cee27834f22f2ffe9b667a341601a976285256a9c63dd6e75e4ba";
|
|
3877
3877
|
var css17 = `._tableRoot_yd6a0_1 {
|
|
3878
3878
|
width: 100%;
|
|
3879
3879
|
}
|
|
@@ -4030,8 +4030,8 @@ var getColumns7 = ({ onSelectPlan } = {}) => {
|
|
|
4030
4030
|
// admin/views/plans/header.tsx
|
|
4031
4031
|
var import_apsara28 = require("@raystack/apsara");
|
|
4032
4032
|
|
|
4033
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4034
|
-
var digest18 = "
|
|
4033
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-sIFULWsRa2qo/sdk/admin/views/plans/plans.module.css.js
|
|
4034
|
+
var digest18 = "9753162d7959b4f979bfeac0c59fb0855b7e9bc68947a2fb5caa994f0a74f25b";
|
|
4035
4035
|
var css18 = `._tableRoot_1d6xr_1 {
|
|
4036
4036
|
width: 100%;
|
|
4037
4037
|
}
|
|
@@ -4084,8 +4084,8 @@ var PlanHeader = ({ header }) => {
|
|
|
4084
4084
|
);
|
|
4085
4085
|
};
|
|
4086
4086
|
|
|
4087
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4088
|
-
var digest19 = "
|
|
4087
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-R9JsooQLme5V/sdk/admin/views/plans/plans.module.css.js
|
|
4088
|
+
var digest19 = "f81be0f0ca6a0110c7f065876ff4af27face94ae047e4328cc34ebf2b38303e7";
|
|
4089
4089
|
var css19 = `._tableRoot_1d6xr_1 {
|
|
4090
4090
|
width: 100%;
|
|
4091
4091
|
}
|
|
@@ -4235,8 +4235,8 @@ var import_react18 = require("react");
|
|
|
4235
4235
|
// admin/views/webhooks/webhooks/columns.tsx
|
|
4236
4236
|
var import_apsara32 = require("@raystack/apsara");
|
|
4237
4237
|
|
|
4238
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4239
|
-
var digest20 = "
|
|
4238
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-4QhplLS4kJ0f/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4239
|
+
var digest20 = "48c73339abead1664afbd0342769fd02f973ac5846efbbc14be7f2d93b8bb766";
|
|
4240
4240
|
var css20 = `._tableRoot_h8n52_1 {
|
|
4241
4241
|
width: 100%;
|
|
4242
4242
|
}
|
|
@@ -4763,8 +4763,8 @@ var getColumns8 = ({ openEditPage, deleteWebhookMutation, enableDelete }) => {
|
|
|
4763
4763
|
// admin/views/webhooks/webhooks/header.tsx
|
|
4764
4764
|
var import_apsara33 = require("@raystack/apsara");
|
|
4765
4765
|
|
|
4766
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4767
|
-
var digest21 = "
|
|
4766
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-POQ4SDEsIg07/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4767
|
+
var digest21 = "f0d66a5c6697a51ea5862edb4c6a5432269cdb47c9dc6b09a35c65828eab381f";
|
|
4768
4768
|
var css21 = `._tableRoot_h8n52_1 {
|
|
4769
4769
|
width: 100%;
|
|
4770
4770
|
}
|
|
@@ -4846,8 +4846,8 @@ var WebhooksHeader = ({ header = pageHeader4, onOpenCreate }) => {
|
|
|
4846
4846
|
);
|
|
4847
4847
|
};
|
|
4848
4848
|
|
|
4849
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4850
|
-
var digest22 = "
|
|
4849
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-qoRBZuHlCoiU/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4850
|
+
var digest22 = "ecf682488693df1e5f8cd8707974c7606462c94a9b8aac2b89c8e258169f79a7";
|
|
4851
4851
|
var css22 = `._tableRoot_h8n52_1 {
|
|
4852
4852
|
width: 100%;
|
|
4853
4853
|
}
|
|
@@ -10435,8 +10435,8 @@ var import_apsara41 = require("@raystack/apsara");
|
|
|
10435
10435
|
// admin/views/preferences/columns.tsx
|
|
10436
10436
|
var import_apsara40 = require("@raystack/apsara");
|
|
10437
10437
|
|
|
10438
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10439
|
-
var digest23 = "
|
|
10438
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-BeLUsFoq3ZP0/sdk/admin/views/preferences/preferences.module.css.js
|
|
10439
|
+
var digest23 = "001811567712fb0fa3a04c6608d2c97dd0e4831fd236e00ec2c29578cfcdc903";
|
|
10440
10440
|
var css23 = `._tableRoot_j5y5o_1 {
|
|
10441
10441
|
width: 100%;
|
|
10442
10442
|
}
|
|
@@ -10518,8 +10518,8 @@ var getColumns9 = ({
|
|
|
10518
10518
|
];
|
|
10519
10519
|
};
|
|
10520
10520
|
|
|
10521
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10522
|
-
var digest24 = "
|
|
10521
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-cWDeTbfjYWVt/sdk/admin/views/preferences/preferences.module.css.js
|
|
10522
|
+
var digest24 = "977b2ca513e5332d58ba4d2704b7481a188f4cb0c3a93dd412c2f5cd88d57466";
|
|
10523
10523
|
var css24 = `._tableRoot_j5y5o_1 {
|
|
10524
10524
|
width: 100%;
|
|
10525
10525
|
}
|
|
@@ -10866,8 +10866,8 @@ var import_apsara47 = require("@raystack/apsara");
|
|
|
10866
10866
|
// admin/views/users/list/navbar.tsx
|
|
10867
10867
|
var import_apsara45 = require("@raystack/apsara");
|
|
10868
10868
|
|
|
10869
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10870
|
-
var digest25 = "
|
|
10869
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-nDYjRNEvbUaq/sdk/admin/views/users/list/list.module.css.js
|
|
10870
|
+
var digest25 = "113734b860d43917a31f13a5a648e571ef6b987da22215f2cbdcf52ab9d0254a";
|
|
10871
10871
|
var css25 = `._navbar_1s15g_1 {
|
|
10872
10872
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
10873
10873
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -10961,8 +10961,8 @@ var import_apsara44 = require("@raystack/apsara");
|
|
|
10961
10961
|
var import_react_hook_form4 = require("react-hook-form");
|
|
10962
10962
|
var import_zod3 = require("@hookform/resolvers/zod");
|
|
10963
10963
|
|
|
10964
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10965
|
-
var digest26 = "
|
|
10964
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-xHo7r7Mp8vBV/sdk/admin/views/users/list/invite-users.module.css.js
|
|
10965
|
+
var digest26 = "af22c706ea4922b8f549d3b80197b6e2914dadc474a7e3aca798e88c6f21556b";
|
|
10966
10966
|
var css26 = `._invite-users-dialog-body_11ujx_1 {
|
|
10967
10967
|
display: flex;
|
|
10968
10968
|
flex-direction: column;
|
|
@@ -11000,6 +11000,34 @@ var invite_users_module_css_default = { "invite-users-dialog-body": "_invite-use
|
|
|
11000
11000
|
var import_connect_query13 = require("@connectrpc/connect-query");
|
|
11001
11001
|
var import_frontier16 = require("@raystack/proton/frontier");
|
|
11002
11002
|
var import_protobuf6 = require("@bufbuild/protobuf");
|
|
11003
|
+
|
|
11004
|
+
// utils/error.ts
|
|
11005
|
+
var import_connect = require("@connectrpc/connect");
|
|
11006
|
+
var DEFAULT_ERROR_MESSAGE = "Something went wrong";
|
|
11007
|
+
function handleConnectError(error, handlers) {
|
|
11008
|
+
const connectError = error instanceof import_connect.ConnectError ? error : new import_connect.ConnectError(
|
|
11009
|
+
typeof error === "string" ? error : error instanceof Error ? error.message : DEFAULT_ERROR_MESSAGE
|
|
11010
|
+
);
|
|
11011
|
+
const defaultHandler = handlers?.Default ?? ((err) => console.error(err.message));
|
|
11012
|
+
switch (connectError.code) {
|
|
11013
|
+
case import_connect.Code.AlreadyExists:
|
|
11014
|
+
handlers?.AlreadyExists ? handlers.AlreadyExists(connectError) : defaultHandler(connectError);
|
|
11015
|
+
break;
|
|
11016
|
+
case import_connect.Code.InvalidArgument:
|
|
11017
|
+
handlers?.InvalidArgument ? handlers.InvalidArgument(connectError) : defaultHandler(connectError);
|
|
11018
|
+
break;
|
|
11019
|
+
case import_connect.Code.PermissionDenied:
|
|
11020
|
+
handlers?.PermissionDenied ? handlers.PermissionDenied(connectError) : defaultHandler(connectError);
|
|
11021
|
+
break;
|
|
11022
|
+
case import_connect.Code.NotFound:
|
|
11023
|
+
handlers?.NotFound ? handlers.NotFound(connectError) : defaultHandler(connectError);
|
|
11024
|
+
break;
|
|
11025
|
+
default:
|
|
11026
|
+
defaultHandler(connectError);
|
|
11027
|
+
}
|
|
11028
|
+
}
|
|
11029
|
+
|
|
11030
|
+
// admin/views/users/list/invite-users.tsx
|
|
11003
11031
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
11004
11032
|
var inviteSchema = objectType({
|
|
11005
11033
|
role: stringType(),
|
|
@@ -11059,9 +11087,6 @@ var InviteUser = () => {
|
|
|
11059
11087
|
const { mutateAsync: inviteUser } = (0, import_connect_query13.useMutation)(
|
|
11060
11088
|
import_frontier16.FrontierServiceQueries.createOrganizationInvitation,
|
|
11061
11089
|
{
|
|
11062
|
-
onError: (error) => {
|
|
11063
|
-
console.error("Failed to invite user", error);
|
|
11064
|
-
},
|
|
11065
11090
|
onSuccess: (data) => {
|
|
11066
11091
|
const invitedCount = data?.invitations?.length ?? 0;
|
|
11067
11092
|
import_apsara44.toast.success(
|
|
@@ -11075,11 +11100,20 @@ var InviteUser = () => {
|
|
|
11075
11100
|
const onSubmit = async (data) => {
|
|
11076
11101
|
if (!data.organizationId)
|
|
11077
11102
|
return;
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11103
|
+
try {
|
|
11104
|
+
await inviteUser({
|
|
11105
|
+
orgId: data.organizationId,
|
|
11106
|
+
userIds: data?.emails,
|
|
11107
|
+
roleIds: data?.role ? [data?.role] : []
|
|
11108
|
+
});
|
|
11109
|
+
} catch (error) {
|
|
11110
|
+
handleConnectError(error, {
|
|
11111
|
+
AlreadyExists: () => import_apsara44.toast.error("Invitation already exists"),
|
|
11112
|
+
InvalidArgument: (err) => import_apsara44.toast.error("Invalid input", { description: err.message }),
|
|
11113
|
+
PermissionDenied: () => import_apsara44.toast.error("You don't have permission to perform this action"),
|
|
11114
|
+
Default: (err) => import_apsara44.toast.error("Something went wrong", { description: err.message })
|
|
11115
|
+
});
|
|
11116
|
+
}
|
|
11083
11117
|
};
|
|
11084
11118
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_apsara44.Dialog, { open, onOpenChange, children: [
|
|
11085
11119
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_apsara44.Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
@@ -11295,8 +11329,8 @@ var Navbar2 = ({ searchQuery, onExportUsers }) => {
|
|
|
11295
11329
|
};
|
|
11296
11330
|
var navbar_default2 = Navbar2;
|
|
11297
11331
|
|
|
11298
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11299
|
-
var digest27 = "
|
|
11332
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-4CW2GlPtgxqr/sdk/admin/views/users/list/list.module.css.js
|
|
11333
|
+
var digest27 = "dbf9eba8eddc00512db29cbdf8cce87ec2aa4f6359c834f2df549e1e59c632ce";
|
|
11300
11334
|
var css27 = `._navbar_1s15g_1 {
|
|
11301
11335
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11302
11336
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11360,8 +11394,8 @@ var list_module_css_default2 = { "navbar": "_navbar_1s15g_1", "table": "_table_1
|
|
|
11360
11394
|
var import_apsara46 = require("@raystack/apsara");
|
|
11361
11395
|
var import_dayjs7 = __toESM(require("dayjs"));
|
|
11362
11396
|
|
|
11363
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11364
|
-
var digest28 = "
|
|
11397
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-JkkqN1rM79F9/sdk/admin/views/users/list/list.module.css.js
|
|
11398
|
+
var digest28 = "38070076e18040d236770bfb618d717ea45f4e5a0b19bd21aab086948e6f2da2";
|
|
11365
11399
|
var css28 = `._navbar_1s15g_1 {
|
|
11366
11400
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11367
11401
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11644,7 +11678,7 @@ var UsersList = ({ onExportUsers, onNavigateToUser }) => {
|
|
|
11644
11678
|
var import_apsara62 = require("@raystack/apsara");
|
|
11645
11679
|
|
|
11646
11680
|
// admin/views/users/details/layout/layout.tsx
|
|
11647
|
-
var
|
|
11681
|
+
var import_react25 = require("react");
|
|
11648
11682
|
var import_apsara55 = require("@raystack/apsara");
|
|
11649
11683
|
|
|
11650
11684
|
// admin/views/users/details/layout/side-panel.tsx
|
|
@@ -11653,8 +11687,8 @@ var import_apsara53 = require("@raystack/apsara");
|
|
|
11653
11687
|
// admin/views/users/details/layout/side-panel-details.tsx
|
|
11654
11688
|
var import_apsara48 = require("@raystack/apsara");
|
|
11655
11689
|
|
|
11656
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11657
|
-
var digest29 = "
|
|
11690
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-34hy4CZA63nt/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11691
|
+
var digest29 = "cbc00762191930c5297af7814d9901c4e2af687ba2bce0879806108f84731416";
|
|
11658
11692
|
var css29 = `._side-panel_1oc3f_1 {
|
|
11659
11693
|
transform: all 0.3s ease-in-out;
|
|
11660
11694
|
padding-bottom: 80px;
|
|
@@ -11761,8 +11795,8 @@ var SidePanelDetails2 = () => {
|
|
|
11761
11795
|
var import_apsara52 = require("@raystack/apsara");
|
|
11762
11796
|
var import_dayjs8 = __toESM(require("dayjs"));
|
|
11763
11797
|
|
|
11764
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11765
|
-
var digest30 = "
|
|
11798
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-K0G44E76D4bm/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11799
|
+
var digest30 = "300821c923814652e4036f75c104cce4bb75664da5d73ea84c621954c5370579";
|
|
11766
11800
|
var css30 = `._side-panel_1oc3f_1 {
|
|
11767
11801
|
transform: all 0.3s ease-in-out;
|
|
11768
11802
|
padding-bottom: 80px;
|
|
@@ -11825,8 +11859,8 @@ var side_panel_module_css_default2 = { "side-panel": "_side-panel_1oc3f_1", "sid
|
|
|
11825
11859
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
11826
11860
|
var import_apsara51 = require("@raystack/apsara");
|
|
11827
11861
|
|
|
11828
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11829
|
-
var digest31 = "
|
|
11862
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-r46FzCvEyJTn/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11863
|
+
var digest31 = "48ce56def47b309aa5f37013eb1895c6762fe604c2dd17945f33e05152d99928";
|
|
11830
11864
|
var css31 = `._side-panel_1oc3f_1 {
|
|
11831
11865
|
transform: all 0.3s ease-in-out;
|
|
11832
11866
|
padding-bottom: 80px;
|
|
@@ -11887,25 +11921,21 @@ var css31 = `._side-panel_1oc3f_1 {
|
|
|
11887
11921
|
var side_panel_module_css_default3 = { "side-panel": "_side-panel_1oc3f_1", "sidePanel": "_side-panel_1oc3f_1", "side-panel-label": "_side-panel-label_1oc3f_6", "sidePanelLabel": "_side-panel-label_1oc3f_6", "text-overflow": "_text-overflow_1oc3f_10", "textOverflow": "_text-overflow_1oc3f_10", "loader-header": "_loader-header_1oc3f_17", "loaderHeader": "_loader-header_1oc3f_17", "dropdown-item": "_dropdown-item_1oc3f_26", "dropdownItem": "_dropdown-item_1oc3f_26", "dropdown-menu-trigger": "_dropdown-menu-trigger_1oc3f_31", "dropdownMenuTrigger": "_dropdown-menu-trigger_1oc3f_31" };
|
|
11888
11922
|
|
|
11889
11923
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
11890
|
-
var
|
|
11924
|
+
var import_react24 = require("react");
|
|
11891
11925
|
var import_frontier19 = require("@raystack/proton/frontier");
|
|
11892
11926
|
var import_protobuf8 = require("@bufbuild/protobuf");
|
|
11893
11927
|
var import_connect_query16 = require("@connectrpc/connect-query");
|
|
11894
11928
|
|
|
11895
11929
|
// admin/components/AssignRole.tsx
|
|
11896
11930
|
var import_apsara49 = require("@raystack/apsara");
|
|
11897
|
-
var import_react23 = require("react");
|
|
11898
11931
|
var import_frontier18 = require("@raystack/proton/frontier");
|
|
11899
11932
|
var import_protobuf7 = require("@bufbuild/protobuf");
|
|
11900
11933
|
var import_connect_query15 = require("@connectrpc/connect-query");
|
|
11901
|
-
var import_connect = require("@connectrpc/connect");
|
|
11902
11934
|
var import_react_hook_form5 = require("react-hook-form");
|
|
11903
11935
|
var import_zod4 = require("@hookform/resolvers/zod");
|
|
11904
11936
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
11905
11937
|
var formSchema = external_exports.object({
|
|
11906
|
-
|
|
11907
|
-
message: "At least one role must be selected"
|
|
11908
|
-
})
|
|
11938
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
11909
11939
|
});
|
|
11910
11940
|
var AssignRole = ({
|
|
11911
11941
|
roles = [],
|
|
@@ -11914,80 +11944,38 @@ var AssignRole = ({
|
|
|
11914
11944
|
onRoleUpdate,
|
|
11915
11945
|
onClose
|
|
11916
11946
|
}) => {
|
|
11917
|
-
const
|
|
11947
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
11918
11948
|
const {
|
|
11919
11949
|
handleSubmit,
|
|
11920
11950
|
watch,
|
|
11921
11951
|
setValue,
|
|
11922
|
-
formState: { isSubmitting, errors }
|
|
11952
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
11923
11953
|
} = (0, import_react_hook_form5.useForm)({
|
|
11924
11954
|
defaultValues: {
|
|
11925
|
-
|
|
11955
|
+
roleId: currentRoleId
|
|
11926
11956
|
},
|
|
11927
11957
|
resolver: (0, import_zod4.zodResolver)(formSchema)
|
|
11928
11958
|
});
|
|
11929
|
-
const { mutateAsync:
|
|
11930
|
-
import_frontier18.FrontierServiceQueries.
|
|
11959
|
+
const { mutateAsync: setMemberRole } = (0, import_connect_query15.useMutation)(
|
|
11960
|
+
import_frontier18.FrontierServiceQueries.setOrganizationMemberRole
|
|
11931
11961
|
);
|
|
11932
|
-
const
|
|
11933
|
-
import_frontier18.FrontierServiceQueries.createPolicy
|
|
11934
|
-
);
|
|
11935
|
-
const roleIds = watch("roleIds");
|
|
11962
|
+
const selectedRoleId = watch("roleId");
|
|
11936
11963
|
function onCheckedChange(value, roleId) {
|
|
11937
11964
|
if (!roleId)
|
|
11938
11965
|
return;
|
|
11939
|
-
const currentRoles = new Set(roleIds);
|
|
11940
11966
|
if (value) {
|
|
11941
|
-
|
|
11942
|
-
} else {
|
|
11943
|
-
currentRoles.delete(roleId);
|
|
11967
|
+
setValue("roleId", roleId, { shouldDirty: true });
|
|
11944
11968
|
}
|
|
11945
|
-
setValue("roleIds", currentRoles);
|
|
11946
11969
|
}
|
|
11947
|
-
const checkRole = (0, import_react23.useCallback)(
|
|
11948
|
-
(roleId) => {
|
|
11949
|
-
if (!roleId)
|
|
11950
|
-
return false;
|
|
11951
|
-
return roleIds?.has(roleId) || false;
|
|
11952
|
-
},
|
|
11953
|
-
[roleIds]
|
|
11954
|
-
);
|
|
11955
11970
|
const onSubmit = async (data) => {
|
|
11956
11971
|
try {
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
(0, import_protobuf7.create)(import_frontier18.ListPoliciesRequestSchema, {
|
|
11972
|
+
await setMemberRole(
|
|
11973
|
+
(0, import_protobuf7.create)(import_frontier18.SetOrganizationMemberRoleRequestSchema, {
|
|
11960
11974
|
orgId: organizationId,
|
|
11961
|
-
userId: user?.id
|
|
11975
|
+
userId: user?.id,
|
|
11976
|
+
roleId: data.roleId
|
|
11962
11977
|
})
|
|
11963
11978
|
);
|
|
11964
|
-
const policies = policiesResp.policies || [];
|
|
11965
|
-
const removedRolesPolicies = policies.filter(
|
|
11966
|
-
(policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
|
|
11967
|
-
);
|
|
11968
|
-
await Promise.all(
|
|
11969
|
-
removedRolesPolicies.map(
|
|
11970
|
-
(policy) => deletePolicy(
|
|
11971
|
-
(0, import_protobuf7.create)(import_frontier18.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
11972
|
-
)
|
|
11973
|
-
)
|
|
11974
|
-
);
|
|
11975
|
-
const resource = `${SCOPES.ORG}:${organizationId}`;
|
|
11976
|
-
const principal = `${SCOPES.USER}:${user?.id}`;
|
|
11977
|
-
const assignedRolesArr = Array.from(data.roleIds);
|
|
11978
|
-
await Promise.all(
|
|
11979
|
-
assignedRolesArr.map(
|
|
11980
|
-
(roleId) => createPolicy(
|
|
11981
|
-
(0, import_protobuf7.create)(import_frontier18.CreatePolicyRequestSchema, {
|
|
11982
|
-
body: {
|
|
11983
|
-
roleId,
|
|
11984
|
-
resource,
|
|
11985
|
-
principal
|
|
11986
|
-
}
|
|
11987
|
-
})
|
|
11988
|
-
)
|
|
11989
|
-
)
|
|
11990
|
-
);
|
|
11991
11979
|
if (onRoleUpdate) {
|
|
11992
11980
|
onRoleUpdate();
|
|
11993
11981
|
}
|
|
@@ -12008,7 +11996,7 @@ var AssignRole = ({
|
|
|
12008
11996
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_apsara49.Flex, { direction: "column", gap: 4, children: [
|
|
12009
11997
|
roles.map((role) => {
|
|
12010
11998
|
const htmlId = `role-${role.id}`;
|
|
12011
|
-
const checked =
|
|
11999
|
+
const checked = selectedRoleId === role.id;
|
|
12012
12000
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_apsara49.Flex, { gap: 3, children: [
|
|
12013
12001
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
12014
12002
|
import_apsara49.Checkbox,
|
|
@@ -12022,7 +12010,7 @@ var AssignRole = ({
|
|
|
12022
12010
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_apsara49.Label, { htmlFor: htmlId, children: role.title })
|
|
12023
12011
|
] }, role.id);
|
|
12024
12012
|
}),
|
|
12025
|
-
errors.
|
|
12013
|
+
errors.roleId && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_apsara49.Text, { variant: "danger", children: errors.roleId.message })
|
|
12026
12014
|
] }) })
|
|
12027
12015
|
] }) }),
|
|
12028
12016
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_apsara49.Dialog.Footer, { children: [
|
|
@@ -12040,6 +12028,7 @@ var AssignRole = ({
|
|
|
12040
12028
|
import_apsara49.Button,
|
|
12041
12029
|
{
|
|
12042
12030
|
type: "submit",
|
|
12031
|
+
disabled: !isDirty2,
|
|
12043
12032
|
"data-test-id": "assign-role-update-button",
|
|
12044
12033
|
loading: isSubmitting,
|
|
12045
12034
|
loaderText: "Updating...",
|
|
@@ -12052,7 +12041,7 @@ var AssignRole = ({
|
|
|
12052
12041
|
};
|
|
12053
12042
|
|
|
12054
12043
|
// admin/views/users/details/layout/suspend-user.tsx
|
|
12055
|
-
var
|
|
12044
|
+
var import_react23 = require("react");
|
|
12056
12045
|
var import_apsara50 = require("@raystack/apsara");
|
|
12057
12046
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
12058
12047
|
var SuspendUser = ({
|
|
@@ -12061,7 +12050,7 @@ var SuspendUser = ({
|
|
|
12061
12050
|
onSubmit
|
|
12062
12051
|
}) => {
|
|
12063
12052
|
const t = useTerminology();
|
|
12064
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
12053
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react23.useState)(false);
|
|
12065
12054
|
const handleSuspend = async () => {
|
|
12066
12055
|
try {
|
|
12067
12056
|
setIsSubmitting(true);
|
|
@@ -12119,8 +12108,8 @@ var MembershipDropdown = ({
|
|
|
12119
12108
|
data,
|
|
12120
12109
|
onReset
|
|
12121
12110
|
}) => {
|
|
12122
|
-
const [isAssignRoleDialogOpen, setIsAssignRoleDialogOpen] = (0,
|
|
12123
|
-
const [isSuspendDialogOpen, setIsSuspendDialogOpen] = (0,
|
|
12111
|
+
const [isAssignRoleDialogOpen, setIsAssignRoleDialogOpen] = (0, import_react24.useState)(false);
|
|
12112
|
+
const [isSuspendDialogOpen, setIsSuspendDialogOpen] = (0, import_react24.useState)(false);
|
|
12124
12113
|
const { user } = useUser();
|
|
12125
12114
|
const { data: defaultRoles = [], isLoading: isDefaultRolesLoading, error: defaultRolesError } = (0, import_connect_query16.useQuery)(
|
|
12126
12115
|
import_frontier19.FrontierServiceQueries.listRoles,
|
|
@@ -12146,7 +12135,7 @@ var MembershipDropdown = ({
|
|
|
12146
12135
|
if (orgRolesError) {
|
|
12147
12136
|
console.error("Failed to fetch organization roles:", orgRolesError);
|
|
12148
12137
|
}
|
|
12149
|
-
const roles = (0,
|
|
12138
|
+
const roles = (0, import_react24.useMemo)(
|
|
12150
12139
|
() => [...defaultRoles, ...organizationRoles],
|
|
12151
12140
|
[defaultRoles, organizationRoles]
|
|
12152
12141
|
);
|
|
@@ -12165,7 +12154,7 @@ var MembershipDropdown = ({
|
|
|
12165
12154
|
toggleSuspendDialog();
|
|
12166
12155
|
onReset?.();
|
|
12167
12156
|
};
|
|
12168
|
-
const memoizedUser = (0,
|
|
12157
|
+
const memoizedUser = (0, import_react24.useMemo)(
|
|
12169
12158
|
() => (0, import_protobuf8.create)(
|
|
12170
12159
|
import_frontier19.SearchOrganizationUsersResponse_OrganizationUserSchema,
|
|
12171
12160
|
Object.assign(user ?? {}, {
|
|
@@ -12264,8 +12253,8 @@ var SidePanelMembership = ({
|
|
|
12264
12253
|
] });
|
|
12265
12254
|
};
|
|
12266
12255
|
|
|
12267
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12268
|
-
var digest32 = "
|
|
12256
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-6aJOeyMO0QD3/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
12257
|
+
var digest32 = "3054e4897b400e012ae561a86ef378a373d8d9ccf85e5b6567b875ad4fa92456";
|
|
12269
12258
|
var css32 = `._side-panel_1oc3f_1 {
|
|
12270
12259
|
transform: all 0.3s ease-in-out;
|
|
12271
12260
|
padding-bottom: 80px;
|
|
@@ -12383,8 +12372,8 @@ var UserDetailsSidePanel = () => {
|
|
|
12383
12372
|
);
|
|
12384
12373
|
};
|
|
12385
12374
|
|
|
12386
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12387
|
-
var digest33 = "
|
|
12375
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-5wqRAesQlcqX/sdk/admin/views/users/details/layout/layout.module.css.js
|
|
12376
|
+
var digest33 = "c08cadd23d7b6f2cf9f0b49e770081f6a74d00eaeaf34b6f6e46731e7a36bb99";
|
|
12388
12377
|
var css33 = `._page_190wz_1 {
|
|
12389
12378
|
height: 100vh;
|
|
12390
12379
|
width: 100%;
|
|
@@ -12418,8 +12407,8 @@ var layout_module_css_default = { "page": "_page_190wz_1", "main_content": "_mai
|
|
|
12418
12407
|
var import_apsara54 = require("@raystack/apsara");
|
|
12419
12408
|
var import_icons = require("@raystack/apsara/icons");
|
|
12420
12409
|
|
|
12421
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12422
|
-
var digest34 = "
|
|
12410
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Kjvw2HG8Q5xN/sdk/admin/views/users/details/layout/navbar.module.css.js
|
|
12411
|
+
var digest34 = "943f0a43035389516f3610d65b90caa0b5d6931b6f87c561d301fe63efbba529";
|
|
12423
12412
|
var css34 = `._navbar_1ahsl_1 {
|
|
12424
12413
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
12425
12414
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -12518,7 +12507,7 @@ var UserDetailsNavbar = ({
|
|
|
12518
12507
|
// admin/views/users/details/layout/layout.tsx
|
|
12519
12508
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
12520
12509
|
var UserDetailsLayout = ({ children, currentPath, onNavigate }) => {
|
|
12521
|
-
const [showSidePanel, setShowSidePanel] = (0,
|
|
12510
|
+
const [showSidePanel, setShowSidePanel] = (0, import_react25.useState)(true);
|
|
12522
12511
|
function toggleSidePanel() {
|
|
12523
12512
|
setShowSidePanel(!showSidePanel);
|
|
12524
12513
|
}
|
|
@@ -12545,7 +12534,7 @@ var import_frontier23 = require("@raystack/proton/frontier");
|
|
|
12545
12534
|
var import_apsara61 = require("@raystack/apsara");
|
|
12546
12535
|
|
|
12547
12536
|
// admin/views/users/details/security/block-user.tsx
|
|
12548
|
-
var
|
|
12537
|
+
var import_react26 = require("react");
|
|
12549
12538
|
var import_apsara56 = require("@raystack/apsara");
|
|
12550
12539
|
var import_connect_query18 = require("@connectrpc/connect-query");
|
|
12551
12540
|
var import_frontier21 = require("@raystack/proton/frontier");
|
|
@@ -12553,13 +12542,13 @@ var import_react_query6 = require("@tanstack/react-query");
|
|
|
12553
12542
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
12554
12543
|
var BlockUserDialog = () => {
|
|
12555
12544
|
const t = useTerminology();
|
|
12556
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
12545
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react26.useState)(false);
|
|
12557
12546
|
const { user, reset } = useUser();
|
|
12558
12547
|
const queryClient = (0, import_react_query6.useQueryClient)();
|
|
12559
12548
|
const transport = (0, import_connect_query18.useTransport)();
|
|
12560
12549
|
const isActive = user?.state === "enabled";
|
|
12561
12550
|
const userName = getUserName(user);
|
|
12562
|
-
const optimisticUpdateState = (0,
|
|
12551
|
+
const optimisticUpdateState = (0, import_react26.useCallback)(
|
|
12563
12552
|
(state) => {
|
|
12564
12553
|
queryClient.setQueryData(
|
|
12565
12554
|
(0, import_connect_query18.createConnectQueryKey)({
|
|
@@ -12590,9 +12579,6 @@ var BlockUserDialog = () => {
|
|
|
12590
12579
|
optimisticUpdateState("disabled");
|
|
12591
12580
|
reset?.();
|
|
12592
12581
|
onOpenChange(false);
|
|
12593
|
-
},
|
|
12594
|
-
onError: (error) => {
|
|
12595
|
-
console.error("Failed to block user", error);
|
|
12596
12582
|
}
|
|
12597
12583
|
}
|
|
12598
12584
|
);
|
|
@@ -12604,9 +12590,6 @@ var BlockUserDialog = () => {
|
|
|
12604
12590
|
optimisticUpdateState("enabled");
|
|
12605
12591
|
reset?.();
|
|
12606
12592
|
onOpenChange(false);
|
|
12607
|
-
},
|
|
12608
|
-
onError: (error) => {
|
|
12609
|
-
console.error("Failed to block user", error);
|
|
12610
12593
|
}
|
|
12611
12594
|
}
|
|
12612
12595
|
);
|
|
@@ -12614,8 +12597,19 @@ var BlockUserDialog = () => {
|
|
|
12614
12597
|
const onOpenChange = (value) => {
|
|
12615
12598
|
setIsDialogOpen(value);
|
|
12616
12599
|
};
|
|
12600
|
+
const handleAction = async (action, errorMessage) => {
|
|
12601
|
+
try {
|
|
12602
|
+
await action({ id: user?.id || "" });
|
|
12603
|
+
} catch (error) {
|
|
12604
|
+
handleConnectError(error, {
|
|
12605
|
+
PermissionDenied: () => import_apsara56.toast.error("You don't have permission to perform this action"),
|
|
12606
|
+
NotFound: (err) => import_apsara56.toast.error("Not found", { description: err.message }),
|
|
12607
|
+
Default: (err) => import_apsara56.toast.error(errorMessage, { description: err.message })
|
|
12608
|
+
});
|
|
12609
|
+
}
|
|
12610
|
+
};
|
|
12617
12611
|
const config = isActive ? {
|
|
12618
|
-
onClick: blockUser,
|
|
12612
|
+
onClick: () => handleAction(blockUser, `Failed to block ${t.user({ case: "lower" })}`),
|
|
12619
12613
|
btnColor: "danger",
|
|
12620
12614
|
btnText: "Block",
|
|
12621
12615
|
dialogTitle: `Block ${t.user({ case: "lower" })}`,
|
|
@@ -12623,7 +12617,7 @@ var BlockUserDialog = () => {
|
|
|
12623
12617
|
dialogConfirmText: "Block",
|
|
12624
12618
|
dialogConfirmLoadingText: "Blocking..."
|
|
12625
12619
|
} : {
|
|
12626
|
-
onClick: unblockUser,
|
|
12620
|
+
onClick: () => handleAction(unblockUser, `Failed to unblock ${t.user({ case: "lower" })}`),
|
|
12627
12621
|
btnColor: "accent",
|
|
12628
12622
|
btnText: "Unblock",
|
|
12629
12623
|
dialogTitle: `Unblock ${t.user({ case: "lower" })}`,
|
|
@@ -12667,7 +12661,7 @@ var BlockUserDialog = () => {
|
|
|
12667
12661
|
"data-test-id": "admin-security-block-user-submit",
|
|
12668
12662
|
loading: isSubmitting,
|
|
12669
12663
|
loaderText: config.dialogConfirmLoadingText,
|
|
12670
|
-
onClick:
|
|
12664
|
+
onClick: config.onClick,
|
|
12671
12665
|
children: config.dialogConfirmText
|
|
12672
12666
|
}
|
|
12673
12667
|
)
|
|
@@ -12677,18 +12671,18 @@ var BlockUserDialog = () => {
|
|
|
12677
12671
|
};
|
|
12678
12672
|
|
|
12679
12673
|
// admin/views/users/details/security/sessions/index.tsx
|
|
12680
|
-
var
|
|
12674
|
+
var import_react28 = require("react");
|
|
12681
12675
|
var import_apsara60 = require("@raystack/apsara");
|
|
12682
12676
|
|
|
12683
12677
|
// admin/views/users/details/security/sessions/revoke-session-confirm.tsx
|
|
12684
|
-
var
|
|
12678
|
+
var import_react27 = require("react");
|
|
12685
12679
|
var import_apsara58 = require("@raystack/apsara");
|
|
12686
12680
|
|
|
12687
12681
|
// admin/views/users/details/security/sessions/revoke-session-final-confirm.tsx
|
|
12688
12682
|
var import_apsara57 = require("@raystack/apsara");
|
|
12689
12683
|
|
|
12690
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12691
|
-
var digest35 = "
|
|
12684
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-yUmTBPDlVszE/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12685
|
+
var digest35 = "b73af486e30d2de004d3f1c545a49ecdc161bf640bc429f20e61076c9352828e";
|
|
12692
12686
|
var css35 = `._sessionsContainer_aq82p_1 {
|
|
12693
12687
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12694
12688
|
border-radius: var(--rs-radius-2);
|
|
@@ -12809,8 +12803,8 @@ var RevokeSessionFinalConfirm = ({
|
|
|
12809
12803
|
) });
|
|
12810
12804
|
};
|
|
12811
12805
|
|
|
12812
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12813
|
-
var digest36 = "
|
|
12806
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-zqTCeiqJc2a6/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12807
|
+
var digest36 = "d45a30d450f8c90eefb459bd52780a42ddfec5cd8f03a82b0866c90dc2af0176";
|
|
12814
12808
|
var css36 = `._sessionsContainer_aq82p_1 {
|
|
12815
12809
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12816
12810
|
border-radius: var(--rs-radius-2);
|
|
@@ -12875,7 +12869,7 @@ var sessions_module_css_default2 = { "sessionsContainer": "_sessionsContainer_aq
|
|
|
12875
12869
|
// admin/views/users/details/security/sessions/revoke-session-confirm.tsx
|
|
12876
12870
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
12877
12871
|
var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm, isLoading = false }) => {
|
|
12878
|
-
const [isFinalConfirmOpen, setIsFinalConfirmOpen] = (0,
|
|
12872
|
+
const [isFinalConfirmOpen, setIsFinalConfirmOpen] = (0, import_react27.useState)(false);
|
|
12879
12873
|
const handleRevoke = () => {
|
|
12880
12874
|
setIsFinalConfirmOpen(true);
|
|
12881
12875
|
};
|
|
@@ -12954,8 +12948,8 @@ var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm
|
|
|
12954
12948
|
// admin/views/users/details/security/sessions/session-skeleton.tsx
|
|
12955
12949
|
var import_apsara59 = require("@raystack/apsara");
|
|
12956
12950
|
|
|
12957
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12958
|
-
var digest37 = "
|
|
12951
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-DLJDqBQi6RiF/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12952
|
+
var digest37 = "fbaafbb53e1c439a33c4fee712db2e866204f0d88562956fedec52fbb059eed2";
|
|
12959
12953
|
var css37 = `._sessionsContainer_aq82p_1 {
|
|
12960
12954
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12961
12955
|
border-radius: var(--rs-radius-2);
|
|
@@ -13036,8 +13030,8 @@ var import_frontier22 = require("@raystack/proton/frontier");
|
|
|
13036
13030
|
var import_dayjs9 = __toESM(require("dayjs"));
|
|
13037
13031
|
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
|
13038
13032
|
|
|
13039
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13040
|
-
var digest38 = "
|
|
13033
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-myn3cf08Ne1E/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
13034
|
+
var digest38 = "7025e374f08df4401b77e0faef321155beb2be5a882da7b85853e478ee9a41dd";
|
|
13041
13035
|
var css38 = `._sessionsContainer_aq82p_1 {
|
|
13042
13036
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
13043
13037
|
border-radius: var(--rs-radius-2);
|
|
@@ -13133,8 +13127,8 @@ var UserSessions = () => {
|
|
|
13133
13127
|
const { user } = useUser();
|
|
13134
13128
|
const queryClient = (0, import_react_query7.useQueryClient)();
|
|
13135
13129
|
const transport = (0, import_connect_query19.useTransport)();
|
|
13136
|
-
const [isRevokeDialogOpen, setIsRevokeDialogOpen] = (0,
|
|
13137
|
-
const [selectedSession, setSelectedSession] = (0,
|
|
13130
|
+
const [isRevokeDialogOpen, setIsRevokeDialogOpen] = (0, import_react28.useState)(false);
|
|
13131
|
+
const [selectedSession, setSelectedSession] = (0, import_react28.useState)(null);
|
|
13138
13132
|
const {
|
|
13139
13133
|
data: sessionsData,
|
|
13140
13134
|
isLoading,
|
|
@@ -13246,8 +13240,8 @@ var UserSessions = () => {
|
|
|
13246
13240
|
] });
|
|
13247
13241
|
};
|
|
13248
13242
|
|
|
13249
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13250
|
-
var digest39 = "
|
|
13243
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-0LeiQhJFfB6y/sdk/admin/views/users/details/security/security.module.css.js
|
|
13244
|
+
var digest39 = "eeb86145ebd66e384d00425caf37a3bc2f5def3204c1619089b9ed950eb691c3";
|
|
13251
13245
|
var css39 = `._container_4259p_1 {
|
|
13252
13246
|
width: 100%;
|
|
13253
13247
|
}
|
|
@@ -13367,14 +13361,14 @@ function UsersView({
|
|
|
13367
13361
|
// admin/views/organizations/list/index.tsx
|
|
13368
13362
|
var import_apsara67 = require("@raystack/apsara");
|
|
13369
13363
|
var import_icons3 = require("@raystack/apsara/icons");
|
|
13370
|
-
var
|
|
13364
|
+
var import_react32 = require("react");
|
|
13371
13365
|
|
|
13372
13366
|
// admin/views/organizations/list/navbar.tsx
|
|
13373
13367
|
var import_apsara63 = require("@raystack/apsara");
|
|
13374
13368
|
var import_icons2 = require("@raystack/apsara/icons");
|
|
13375
13369
|
|
|
13376
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13377
|
-
var digest40 = "
|
|
13370
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-kaaZ1N20owN2/sdk/admin/views/organizations/list/list.module.css.js
|
|
13371
|
+
var digest40 = "e718b839c85b251b3040bbd80569cf81b5ed69f694a4a49c719eb0d1e688aed9";
|
|
13378
13372
|
var css40 = `._navbar_1py96_1 {
|
|
13379
13373
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13380
13374
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13479,7 +13473,7 @@ var css40 = `._navbar_1py96_1 {
|
|
|
13479
13473
|
var list_module_css_default4 = { "navbar": "_navbar_1py96_1", "table": "_table_1py96_10", "table-empty": "_table-empty_1py96_14", "tableEmpty": "_table-empty_1py96_14", "empty-state": "_empty-state_1py96_18", "emptyState": "_empty-state_1py96_18", "empty-state-subheading": "_empty-state-subheading_1py96_22", "emptyStateSubheading": "_empty-state-subheading_1py96_22", "name-column": "_name-column_1py96_27", "nameColumn": "_name-column_1py96_27", "creator-column": "_creator-column_1py96_32", "creatorColumn": "_creator-column_1py96_32", "country-column": "_country-column_1py96_36", "countryColumn": "_country-column_1py96_36", "table-wrapper": "_table-wrapper_1py96_40", "tableWrapper": "_table-wrapper_1py96_40", "table-header": "_table-header_1py96_46", "tableHeader": "_table-header_1py96_46", "drawer-content": "_drawer-content_1py96_51", "drawerContent": "_drawer-content_1py96_51", "side-panel": "_side-panel_1py96_57", "sidePanel": "_side-panel_1py96_57", "side-panel-form": "_side-panel-form_1py96_65", "sidePanelForm": "_side-panel-form_1py96_65", "side-panel-content": "_side-panel-content_1py96_73", "sidePanelContent": "_side-panel-content_1py96_73", "side-panel-footer": "_side-panel-footer_1py96_78", "sidePanelFooter": "_side-panel-footer_1py96_78", "select-value": "_select-value_1py96_83", "selectValue": "_select-value_1py96_83", "select-content": "_select-content_1py96_87", "selectContent": "_select-content_1py96_87" };
|
|
13480
13474
|
|
|
13481
13475
|
// admin/views/organizations/list/navbar.tsx
|
|
13482
|
-
var
|
|
13476
|
+
var import_react29 = require("react");
|
|
13483
13477
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
13484
13478
|
var OrganizationsNavabar = ({
|
|
13485
13479
|
searchQuery,
|
|
@@ -13487,8 +13481,8 @@ var OrganizationsNavabar = ({
|
|
|
13487
13481
|
onExportCsv
|
|
13488
13482
|
}) => {
|
|
13489
13483
|
const t = useTerminology();
|
|
13490
|
-
const [showSearch, setShowSearch] = (0,
|
|
13491
|
-
const [isDownloading, setIsDownloading] = (0,
|
|
13484
|
+
const [showSearch, setShowSearch] = (0, import_react29.useState)(searchQuery ? true : false);
|
|
13485
|
+
const [isDownloading, setIsDownloading] = (0, import_react29.useState)(false);
|
|
13492
13486
|
function toggleSearch() {
|
|
13493
13487
|
setShowSearch((prev) => !prev);
|
|
13494
13488
|
}
|
|
@@ -13563,8 +13557,8 @@ var OrganizationsNavabar = ({
|
|
|
13563
13557
|
] });
|
|
13564
13558
|
};
|
|
13565
13559
|
|
|
13566
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13567
|
-
var digest41 = "
|
|
13560
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-WY68NAfyN8pW/sdk/admin/views/organizations/list/list.module.css.js
|
|
13561
|
+
var digest41 = "f1194c36e92c9e6d43a64ed13d266df3ad6ced98767e25985ffe8935b863069a";
|
|
13568
13562
|
var css41 = `._navbar_1py96_1 {
|
|
13569
13563
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13570
13564
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13672,8 +13666,8 @@ var list_module_css_default5 = { "navbar": "_navbar_1py96_1", "table": "_table_1
|
|
|
13672
13666
|
var import_apsara64 = require("@raystack/apsara");
|
|
13673
13667
|
var import_dayjs10 = __toESM(require("dayjs"));
|
|
13674
13668
|
|
|
13675
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13676
|
-
var digest42 = "
|
|
13669
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-n83r3fHKHj8l/sdk/admin/views/organizations/list/list.module.css.js
|
|
13670
|
+
var digest42 = "6d7957798f17e14d65df927c02a6830beebd0941523831043864a528da66f609";
|
|
13677
13671
|
var css42 = `._navbar_1py96_1 {
|
|
13678
13672
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13679
13673
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13937,10 +13931,10 @@ var import_frontier25 = require("@raystack/proton/frontier");
|
|
|
13937
13931
|
var import_protobuf9 = require("@bufbuild/protobuf");
|
|
13938
13932
|
|
|
13939
13933
|
// admin/views/organizations/list/create.tsx
|
|
13940
|
-
var
|
|
13934
|
+
var import_react31 = require("react");
|
|
13941
13935
|
|
|
13942
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13943
|
-
var digest43 = "
|
|
13936
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-J2WK7WyP9qes/sdk/admin/views/organizations/list/list.module.css.js
|
|
13937
|
+
var digest43 = "0b18b150b17030c5105928c78777865483e4cb62160afd988ba3e7de9c7a6a3d";
|
|
13944
13938
|
var css43 = `._navbar_1py96_1 {
|
|
13945
13939
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13946
13940
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -14049,7 +14043,7 @@ var import_apsara66 = require("@raystack/apsara");
|
|
|
14049
14043
|
|
|
14050
14044
|
// react/components/avatar-upload/index.tsx
|
|
14051
14045
|
var import_react_image_crop = __toESM(require("react-image-crop"));
|
|
14052
|
-
var
|
|
14046
|
+
var import_react30 = __toESM(require("react"));
|
|
14053
14047
|
var import_apsara65 = require("@raystack/apsara");
|
|
14054
14048
|
|
|
14055
14049
|
// react/assets/cross.svg
|
|
@@ -14058,8 +14052,8 @@ var cross_default = 'data:image/svg+xml,<svg width="20" height="20" viewBox="0 0
|
|
|
14058
14052
|
// react/components/avatar-upload/index.tsx
|
|
14059
14053
|
var import_ReactCrop = require("react-image-crop/dist/ReactCrop.css");
|
|
14060
14054
|
|
|
14061
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14062
|
-
var digest44 = "
|
|
14055
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-88FCpLA9DaXq/sdk/react/components/avatar-upload/avatar-upload.module.css.js
|
|
14056
|
+
var digest44 = "bf6e42aa4ea6c81e7107afdefa681a3a53fb2e2780cb221cbbb1f8b54c254405";
|
|
14063
14057
|
var css44 = `._container_1k4dc_1 {
|
|
14064
14058
|
display: flex;
|
|
14065
14059
|
flex-direction: column;
|
|
@@ -14137,8 +14131,8 @@ var avatar_upload_module_css_default = { "container": "_container_1k4dc_1", "upl
|
|
|
14137
14131
|
// react/components/avatar-upload/index.tsx
|
|
14138
14132
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
14139
14133
|
function CropModal({ onClose, imgSrc, onSave }) {
|
|
14140
|
-
const [crop, setCrop] = (0,
|
|
14141
|
-
const imgRef = (0,
|
|
14134
|
+
const [crop, setCrop] = (0, import_react30.useState)();
|
|
14135
|
+
const imgRef = (0, import_react30.useRef)(null);
|
|
14142
14136
|
async function handleSave() {
|
|
14143
14137
|
const image = imgRef.current;
|
|
14144
14138
|
if (!image) {
|
|
@@ -14264,13 +14258,13 @@ function CropModal({ onClose, imgSrc, onSave }) {
|
|
|
14264
14258
|
}
|
|
14265
14259
|
) });
|
|
14266
14260
|
}
|
|
14267
|
-
var AvatarUpload =
|
|
14261
|
+
var AvatarUpload = import_react30.default.forwardRef(
|
|
14268
14262
|
({ subText, value, onChange = () => {
|
|
14269
14263
|
}, initials = "", disabled = false }, forwardedRef) => {
|
|
14270
|
-
const inputRef = (0,
|
|
14271
|
-
const [imgSrc, setImgSrc] = (0,
|
|
14272
|
-
const [showCropModal, setShowCropModal] = (0,
|
|
14273
|
-
const [isHover, setIsHover] = (0,
|
|
14264
|
+
const inputRef = (0, import_react30.useRef)(null);
|
|
14265
|
+
const [imgSrc, setImgSrc] = (0, import_react30.useState)("");
|
|
14266
|
+
const [showCropModal, setShowCropModal] = (0, import_react30.useState)(false);
|
|
14267
|
+
const [isHover, setIsHover] = (0, import_react30.useState)(false);
|
|
14274
14268
|
function onUploadIconClick() {
|
|
14275
14269
|
const inputField = inputRef.current;
|
|
14276
14270
|
inputField?.click();
|
|
@@ -14355,9 +14349,9 @@ function CreateOrganizationPanel({
|
|
|
14355
14349
|
onSuccess
|
|
14356
14350
|
}) {
|
|
14357
14351
|
const t = useTerminology();
|
|
14358
|
-
const [countries, setCountries] = (0,
|
|
14352
|
+
const [countries, setCountries] = (0, import_react31.useState)(countriesProp);
|
|
14359
14353
|
const industries = organizationTypes;
|
|
14360
|
-
(0,
|
|
14354
|
+
(0, import_react31.useEffect)(() => {
|
|
14361
14355
|
if (countriesProp.length > 0) {
|
|
14362
14356
|
setCountries(countriesProp);
|
|
14363
14357
|
}
|
|
@@ -14378,7 +14372,7 @@ function CreateOrganizationPanel({
|
|
|
14378
14372
|
error: mutationError,
|
|
14379
14373
|
isPending
|
|
14380
14374
|
} = (0, import_connect_query21.useMutation)(import_frontier24.AdminServiceQueries.adminCreateOrganization);
|
|
14381
|
-
(0,
|
|
14375
|
+
(0, import_react31.useEffect)(() => {
|
|
14382
14376
|
if (mutationError) {
|
|
14383
14377
|
if (mutationError.message?.includes("already exists")) {
|
|
14384
14378
|
setError("name", { message: `${t.organization({ case: "capital" })} name already exists` });
|
|
@@ -14644,7 +14638,7 @@ var OrganizationListView = ({
|
|
|
14644
14638
|
countries = []
|
|
14645
14639
|
} = {}) => {
|
|
14646
14640
|
const t = useTerminology();
|
|
14647
|
-
const [showCreatePanel, setShowCreatePanel] = (0,
|
|
14641
|
+
const [showCreatePanel, setShowCreatePanel] = (0, import_react32.useState)(false);
|
|
14648
14642
|
const [tableQuery, setTableQuery] = (0, import_hooks3.useDebouncedState)(
|
|
14649
14643
|
INITIAL_QUERY4,
|
|
14650
14644
|
200
|
|
@@ -14685,7 +14679,7 @@ var OrganizationListView = ({
|
|
|
14685
14679
|
select: (data2) => data2?.plans || []
|
|
14686
14680
|
}
|
|
14687
14681
|
);
|
|
14688
|
-
(0,
|
|
14682
|
+
(0, import_react32.useEffect)(() => {
|
|
14689
14683
|
if (plansError) {
|
|
14690
14684
|
console.error("Failed to fetch plans:", plansError);
|
|
14691
14685
|
}
|
|
@@ -14789,7 +14783,7 @@ var OrganizationListView = ({
|
|
|
14789
14783
|
};
|
|
14790
14784
|
|
|
14791
14785
|
// admin/views/organizations/details/index.tsx
|
|
14792
|
-
var
|
|
14786
|
+
var import_react46 = require("react");
|
|
14793
14787
|
var import_connect_query31 = require("@connectrpc/connect-query");
|
|
14794
14788
|
var import_react_query12 = require("@tanstack/react-query");
|
|
14795
14789
|
var import_protobuf19 = require("@bufbuild/protobuf");
|
|
@@ -14798,8 +14792,8 @@ var import_protobuf19 = require("@bufbuild/protobuf");
|
|
|
14798
14792
|
var import_icons4 = require("@raystack/apsara/icons");
|
|
14799
14793
|
var import_apsara70 = require("@raystack/apsara");
|
|
14800
14794
|
|
|
14801
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14802
|
-
var digest45 = "
|
|
14795
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-uR7keXOUW2sr/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
14796
|
+
var digest45 = "1d4b5a87072fa7cfe00d7636b084d8d4c34c7abe8c920915f45c9a6489dbb159";
|
|
14803
14797
|
var css45 = `._page_1jsqa_1 {
|
|
14804
14798
|
width: 100%;
|
|
14805
14799
|
height: 100vh;
|
|
@@ -14894,10 +14888,10 @@ var layout_module_css_default2 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
14894
14888
|
|
|
14895
14889
|
// admin/views/organizations/details/layout/invite-users-dialog.tsx
|
|
14896
14890
|
var import_apsara68 = require("@raystack/apsara");
|
|
14897
|
-
var
|
|
14891
|
+
var import_react34 = require("react");
|
|
14898
14892
|
|
|
14899
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14900
|
-
var digest46 = "
|
|
14893
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Ct6sz1D531s0/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
14894
|
+
var digest46 = "00edc97a3e025b27444eccded87020d92ee98afae5d70a7996ff086eb9e7b701";
|
|
14901
14895
|
var css46 = `._page_1jsqa_1 {
|
|
14902
14896
|
width: 100%;
|
|
14903
14897
|
height: 100vh;
|
|
@@ -14993,7 +14987,7 @@ var layout_module_css_default3 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
14993
14987
|
// admin/views/organizations/details/contexts/organization-context.tsx
|
|
14994
14988
|
var import_frontier26 = require("@raystack/proton/frontier");
|
|
14995
14989
|
var import_protobuf10 = require("@bufbuild/protobuf");
|
|
14996
|
-
var
|
|
14990
|
+
var import_react33 = require("react");
|
|
14997
14991
|
var defaultOrganiztionContextValue = {
|
|
14998
14992
|
roles: [],
|
|
14999
14993
|
organization: (0, import_protobuf10.create)(import_frontier26.OrganizationSchema),
|
|
@@ -15025,7 +15019,7 @@ var defaultOrganiztionContextValue = {
|
|
|
15025
15019
|
countries: void 0,
|
|
15026
15020
|
organizationTypes: void 0
|
|
15027
15021
|
};
|
|
15028
|
-
var OrganizationContext = (0,
|
|
15022
|
+
var OrganizationContext = (0, import_react33.createContext)(defaultOrganiztionContextValue);
|
|
15029
15023
|
|
|
15030
15024
|
// admin/views/organizations/details/layout/invite-users-dialog.tsx
|
|
15031
15025
|
var import_zod8 = require("@hookform/resolvers/zod");
|
|
@@ -15052,11 +15046,11 @@ var inviteSchema2 = objectType({
|
|
|
15052
15046
|
});
|
|
15053
15047
|
var InviteUsersDialog = ({ onOpenChange }) => {
|
|
15054
15048
|
const t = useTerminology();
|
|
15055
|
-
const { roles = [], organization } = (0,
|
|
15049
|
+
const { roles = [], organization } = (0, import_react34.useContext)(OrganizationContext);
|
|
15056
15050
|
const queryClient = (0, import_react_query8.useQueryClient)();
|
|
15057
15051
|
const transport = (0, import_connect_query23.useTransport)();
|
|
15058
15052
|
const organizationId = organization?.id || "";
|
|
15059
|
-
const defaultRoleId = (0,
|
|
15053
|
+
const defaultRoleId = (0, import_react34.useMemo)(
|
|
15060
15054
|
() => roles?.find((role) => role.name === DEFAULT_INVITE_ROLE)?.id,
|
|
15061
15055
|
[roles]
|
|
15062
15056
|
);
|
|
@@ -15083,25 +15077,28 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
15083
15077
|
`${t.user({ case: "capital", plural: inviteCount > 1 })} invited`
|
|
15084
15078
|
);
|
|
15085
15079
|
onOpenChange(false);
|
|
15086
|
-
},
|
|
15087
|
-
onError: (error) => {
|
|
15088
|
-
import_apsara68.toast.error("Something went wrong", {
|
|
15089
|
-
description: error.message
|
|
15090
|
-
});
|
|
15091
|
-
console.error("Unable to invite user:", error);
|
|
15092
15080
|
}
|
|
15093
15081
|
}
|
|
15094
15082
|
);
|
|
15095
15083
|
const onSubmit = async (data) => {
|
|
15096
15084
|
if (!organizationId)
|
|
15097
15085
|
return;
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15086
|
+
try {
|
|
15087
|
+
await createInvitation(
|
|
15088
|
+
(0, import_protobuf11.create)(import_frontier27.CreateOrganizationInvitationRequestSchema, {
|
|
15089
|
+
orgId: organizationId,
|
|
15090
|
+
userIds: data.emails,
|
|
15091
|
+
roleIds: data.role ? [data.role] : []
|
|
15092
|
+
})
|
|
15093
|
+
);
|
|
15094
|
+
} catch (error) {
|
|
15095
|
+
handleConnectError(error, {
|
|
15096
|
+
AlreadyExists: () => import_apsara68.toast.error("Invitation already exists"),
|
|
15097
|
+
InvalidArgument: (err) => import_apsara68.toast.error("Invalid input", { description: err.message }),
|
|
15098
|
+
PermissionDenied: () => import_apsara68.toast.error("You don't have permission to perform this action"),
|
|
15099
|
+
Default: (err) => import_apsara68.toast.error("Something went wrong", { description: err.message })
|
|
15100
|
+
});
|
|
15101
|
+
}
|
|
15105
15102
|
};
|
|
15106
15103
|
const isSubmitting = methods?.formState?.isSubmitting;
|
|
15107
15104
|
const errors = methods?.formState?.errors;
|
|
@@ -15180,11 +15177,11 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
15180
15177
|
|
|
15181
15178
|
// admin/views/organizations/details/layout/add-tokens-dialog.tsx
|
|
15182
15179
|
var import_apsara69 = require("@raystack/apsara");
|
|
15183
|
-
var
|
|
15180
|
+
var import_react35 = require("react");
|
|
15184
15181
|
var import_react_hook_form8 = require("react-hook-form");
|
|
15185
15182
|
|
|
15186
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15187
|
-
var digest47 = "
|
|
15183
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-bC1ab36ZkuG8/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15184
|
+
var digest47 = "6346b5300a902b54236f1e1d2bfead92d7ccbf57033c4efbb2e59cc2a688f83a";
|
|
15188
15185
|
var css47 = `._page_1jsqa_1 {
|
|
15189
15186
|
width: 100%;
|
|
15190
15187
|
height: 100vh;
|
|
@@ -15292,7 +15289,7 @@ var addTokensSchema = objectType({
|
|
|
15292
15289
|
}).min(1).transform((num) => num.toString())
|
|
15293
15290
|
});
|
|
15294
15291
|
var AddTokensDialog = ({ onOpenChange }) => {
|
|
15295
|
-
const { organization, billingAccount, fetchTokenBalance, tokenProductId } = (0,
|
|
15292
|
+
const { organization, billingAccount, fetchTokenBalance, tokenProductId } = (0, import_react35.useContext)(OrganizationContext);
|
|
15296
15293
|
const queryClient = (0, import_react_query9.useQueryClient)();
|
|
15297
15294
|
const transport = (0, import_connect_query24.useTransport)();
|
|
15298
15295
|
const organisationId = organization?.id || "";
|
|
@@ -15399,7 +15396,7 @@ var AddTokensDialog = ({ onOpenChange }) => {
|
|
|
15399
15396
|
};
|
|
15400
15397
|
|
|
15401
15398
|
// admin/views/organizations/details/layout/navbar.tsx
|
|
15402
|
-
var
|
|
15399
|
+
var import_react36 = require("react");
|
|
15403
15400
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
15404
15401
|
var DropdownItem = ({ item }) => {
|
|
15405
15402
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
@@ -15427,11 +15424,11 @@ var NavbarActionMenu = ({
|
|
|
15427
15424
|
onExportTokens
|
|
15428
15425
|
}) => {
|
|
15429
15426
|
const t = useTerminology();
|
|
15430
|
-
const [isInviteUsersDialogOpen, setIsInviteUsersDialogOpen] = (0,
|
|
15431
|
-
const [isAddTokensDialogOpen, setIsAddTokensDialogOpen] = (0,
|
|
15432
|
-
const [isMembersDownloading, setIsMembersDownloading] = (0,
|
|
15433
|
-
const [isProjectsDownloading, setIsProjectsDownloading] = (0,
|
|
15434
|
-
const [isTokensDownloading, setIsTokensDownloading] = (0,
|
|
15427
|
+
const [isInviteUsersDialogOpen, setIsInviteUsersDialogOpen] = (0, import_react36.useState)(false);
|
|
15428
|
+
const [isAddTokensDialogOpen, setIsAddTokensDialogOpen] = (0, import_react36.useState)(false);
|
|
15429
|
+
const [isMembersDownloading, setIsMembersDownloading] = (0, import_react36.useState)(false);
|
|
15430
|
+
const [isProjectsDownloading, setIsProjectsDownloading] = (0, import_react36.useState)(false);
|
|
15431
|
+
const [isTokensDownloading, setIsTokensDownloading] = (0, import_react36.useState)(false);
|
|
15435
15432
|
const openInviteUsersDialog = () => {
|
|
15436
15433
|
setIsInviteUsersDialogOpen(true);
|
|
15437
15434
|
};
|
|
@@ -15597,7 +15594,7 @@ var OrganizationsDetailsNavabar = ({
|
|
|
15597
15594
|
}) => {
|
|
15598
15595
|
const t = useTerminology();
|
|
15599
15596
|
const adminPaths = useAdminPaths();
|
|
15600
|
-
const { search } = (0,
|
|
15597
|
+
const { search } = (0, import_react36.useContext)(OrganizationContext);
|
|
15601
15598
|
function handleSearchChange(e) {
|
|
15602
15599
|
const value = e.target.value;
|
|
15603
15600
|
search.onChange(value);
|
|
@@ -15679,8 +15676,8 @@ var OrganizationsDetailsNavabar = ({
|
|
|
15679
15676
|
] });
|
|
15680
15677
|
};
|
|
15681
15678
|
|
|
15682
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15683
|
-
var digest48 = "
|
|
15679
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-uTMj4xumq2xC/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15680
|
+
var digest48 = "b9ab7679a823732fef36c81af06660d08a3f51acdd27dbd51f94aa414448e997";
|
|
15684
15681
|
var css48 = `._page_1jsqa_1 {
|
|
15685
15682
|
width: 100%;
|
|
15686
15683
|
height: 100vh;
|
|
@@ -15782,8 +15779,8 @@ var import_apsara77 = require("@raystack/apsara");
|
|
|
15782
15779
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
15783
15780
|
var import_apsara71 = require("@raystack/apsara");
|
|
15784
15781
|
|
|
15785
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15786
|
-
var digest49 = "
|
|
15782
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-xySc00RwRC0h/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15783
|
+
var digest49 = "1458ec11192abab276355d0ae66344c6b45ca6e923c19976a9349ef526a33de4";
|
|
15787
15784
|
var css49 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15788
15785
|
width: 120px;
|
|
15789
15786
|
}
|
|
@@ -15816,12 +15813,12 @@ var side_panel_module_css_default5 = { "side-panel-section-item-label": "_side-p
|
|
|
15816
15813
|
|
|
15817
15814
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
15818
15815
|
var import_dayjs11 = __toESM(require("dayjs"));
|
|
15819
|
-
var
|
|
15816
|
+
var import_react37 = require("react");
|
|
15820
15817
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
15821
15818
|
var OrganizationDetailsSection = ({
|
|
15822
15819
|
organization
|
|
15823
15820
|
}) => {
|
|
15824
|
-
const { appUrl } = (0,
|
|
15821
|
+
const { appUrl } = (0, import_react37.useContext)(OrganizationContext);
|
|
15825
15822
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_apsara71.List, { children: [
|
|
15826
15823
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_apsara71.List.Header, { children: "Organization Details" }),
|
|
15827
15824
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_apsara71.List.Item, { children: [
|
|
@@ -15871,10 +15868,10 @@ var OrganizationDetailsSection = ({
|
|
|
15871
15868
|
|
|
15872
15869
|
// admin/views/organizations/details/side-panel/kyc-section.tsx
|
|
15873
15870
|
var import_apsara72 = require("@raystack/apsara");
|
|
15874
|
-
var
|
|
15871
|
+
var import_react38 = require("react");
|
|
15875
15872
|
|
|
15876
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15877
|
-
var digest50 = "
|
|
15873
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-2W586dBdfbzF/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15874
|
+
var digest50 = "2bf081bd3a472386e189a058fc802787cce70a2066a8fdc2e71ff7648e9d79bc";
|
|
15878
15875
|
var css50 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15879
15876
|
width: 120px;
|
|
15880
15877
|
}
|
|
@@ -15909,7 +15906,7 @@ var side_panel_module_css_default6 = { "side-panel-section-item-label": "_side-p
|
|
|
15909
15906
|
var import_icons5 = require("@raystack/apsara/icons");
|
|
15910
15907
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
15911
15908
|
var KYCDetailsSection = () => {
|
|
15912
|
-
const { isKYCLoading, kycDetails } = (0,
|
|
15909
|
+
const { isKYCLoading, kycDetails } = (0, import_react38.useContext)(OrganizationContext);
|
|
15913
15910
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_apsara72.List, { children: [
|
|
15914
15911
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_apsara72.List.Header, { children: "KYC Details" }),
|
|
15915
15912
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_apsara72.List.Item, { children: [
|
|
@@ -15954,11 +15951,11 @@ var KYCDetailsSection = () => {
|
|
|
15954
15951
|
};
|
|
15955
15952
|
|
|
15956
15953
|
// admin/views/organizations/details/side-panel/plan-details-section.tsx
|
|
15957
|
-
var
|
|
15954
|
+
var import_react39 = require("react");
|
|
15958
15955
|
var import_apsara73 = require("@raystack/apsara");
|
|
15959
15956
|
|
|
15960
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15961
|
-
var digest51 = "
|
|
15957
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-5xTQoTqZ2CmB/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15958
|
+
var digest51 = "117324e4c2bf085b2f1139dc18e85da679e7c728a2fa62e32044c4765bcc1b0b";
|
|
15962
15959
|
var css51 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15963
15960
|
width: 120px;
|
|
15964
15961
|
}
|
|
@@ -15995,7 +15992,7 @@ var import_frontier29 = require("@raystack/proton/frontier");
|
|
|
15995
15992
|
var import_protobuf13 = require("@bufbuild/protobuf");
|
|
15996
15993
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
15997
15994
|
var PlanDetailsSection = () => {
|
|
15998
|
-
const { billingAccount, organization } = (0,
|
|
15995
|
+
const { billingAccount, organization } = (0, import_react39.useContext)(OrganizationContext);
|
|
15999
15996
|
const billingAccountId = billingAccount?.id || "";
|
|
16000
15997
|
const organizationId = organization?.id || "";
|
|
16001
15998
|
const { data: activeSubscription, isLoading: isSubscriptionLoading, error: subscriptionsError } = (0, import_connect_query25.useQuery)(
|
|
@@ -16059,8 +16056,8 @@ var PlanDetailsSection = () => {
|
|
|
16059
16056
|
// admin/views/organizations/details/side-panel/tokens-details-section.tsx
|
|
16060
16057
|
var import_apsara74 = require("@raystack/apsara");
|
|
16061
16058
|
|
|
16062
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16063
|
-
var digest52 = "
|
|
16059
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-yW0O7if85KwN/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16060
|
+
var digest52 = "73694c0abaf75bb950cca5a9095b5f4c1f754171eb8c86d5635e177f41c2c988";
|
|
16064
16061
|
var css52 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16065
16062
|
width: 120px;
|
|
16066
16063
|
}
|
|
@@ -16092,7 +16089,7 @@ var css52 = `._side-panel-section-item-label_yeg6h_1 {
|
|
|
16092
16089
|
var side_panel_module_css_default8 = { "side-panel-section-item-label": "_side-panel-section-item-label_yeg6h_1", "sidePanelSectionItemLabel": "_side-panel-section-item-label_yeg6h_1", "org-details-section-org-id": "_org-details-section-org-id_yeg6h_5", "orgDetailsSectionOrgId": "_org-details-section-org-id_yeg6h_5", "kyc_link": "_kyc_link_yeg6h_6", "kycLink": "_kyc_link_yeg6h_6", "kyc-status-icon": "_kyc-status-icon_yeg6h_13", "kycStatusIcon": "_kyc-status-icon_yeg6h_13" };
|
|
16093
16090
|
|
|
16094
16091
|
// admin/views/organizations/details/side-panel/tokens-details-section.tsx
|
|
16095
|
-
var
|
|
16092
|
+
var import_react40 = require("react");
|
|
16096
16093
|
var import_connect_query26 = require("@connectrpc/connect-query");
|
|
16097
16094
|
var import_frontier30 = require("@raystack/proton/frontier");
|
|
16098
16095
|
var import_protobuf14 = require("@bufbuild/protobuf");
|
|
@@ -16104,7 +16101,7 @@ var TokensDetailsSection = () => {
|
|
|
16104
16101
|
organization,
|
|
16105
16102
|
isTokenBalanceLoading,
|
|
16106
16103
|
billingAccountDetails
|
|
16107
|
-
} = (0,
|
|
16104
|
+
} = (0, import_react40.useContext)(OrganizationContext);
|
|
16108
16105
|
const organizationId = organization?.id || "";
|
|
16109
16106
|
const billingAccountId = billingAccount?.id || "";
|
|
16110
16107
|
const { data: tokensUsed = "0", isLoading: isTokensLoading, error } = (0, import_connect_query26.useQuery)(
|
|
@@ -16118,7 +16115,7 @@ var TokensDetailsSection = () => {
|
|
|
16118
16115
|
select: (data) => String(data?.debited?.amount || "0")
|
|
16119
16116
|
}
|
|
16120
16117
|
);
|
|
16121
|
-
(0,
|
|
16118
|
+
(0, import_react40.useEffect)(() => {
|
|
16122
16119
|
if (error) {
|
|
16123
16120
|
console.error("Error fetching debited transactions:", error);
|
|
16124
16121
|
}
|
|
@@ -16161,8 +16158,8 @@ var TokensDetailsSection = () => {
|
|
|
16161
16158
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
16162
16159
|
var import_apsara75 = require("@raystack/apsara");
|
|
16163
16160
|
|
|
16164
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16165
|
-
var digest53 = "
|
|
16161
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-OluN4I1mrKXV/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16162
|
+
var digest53 = "34e380ee069e74452a5039a4f8094bee3dba4201aaed585faab8ebc2404c4157";
|
|
16166
16163
|
var css53 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16167
16164
|
width: 120px;
|
|
16168
16165
|
}
|
|
@@ -16194,14 +16191,14 @@ var css53 = `._side-panel-section-item-label_yeg6h_1 {
|
|
|
16194
16191
|
var side_panel_module_css_default9 = { "side-panel-section-item-label": "_side-panel-section-item-label_yeg6h_1", "sidePanelSectionItemLabel": "_side-panel-section-item-label_yeg6h_1", "org-details-section-org-id": "_org-details-section-org-id_yeg6h_5", "orgDetailsSectionOrgId": "_org-details-section-org-id_yeg6h_5", "kyc_link": "_kyc_link_yeg6h_6", "kycLink": "_kyc_link_yeg6h_6", "kyc-status-icon": "_kyc-status-icon_yeg6h_13", "kycStatusIcon": "_kyc-status-icon_yeg6h_13" };
|
|
16195
16192
|
|
|
16196
16193
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
16197
|
-
var
|
|
16194
|
+
var import_react41 = require("react");
|
|
16198
16195
|
var import_apsara76 = require("@raystack/apsara");
|
|
16199
16196
|
var import_connect_query27 = require("@connectrpc/connect-query");
|
|
16200
16197
|
var import_frontier31 = require("@raystack/proton/frontier");
|
|
16201
16198
|
var import_protobuf15 = require("@bufbuild/protobuf");
|
|
16202
16199
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
16203
16200
|
var BillingDetailsSection = () => {
|
|
16204
|
-
const { billingAccount, organization } = (0,
|
|
16201
|
+
const { billingAccount, organization } = (0, import_react41.useContext)(OrganizationContext);
|
|
16205
16202
|
const organizationId = organization?.id || "";
|
|
16206
16203
|
const billingAccountId = billingAccount?.id || "";
|
|
16207
16204
|
const { data: upcomingInvoice, isLoading, error } = (0, import_connect_query27.useQuery)(
|
|
@@ -16215,7 +16212,7 @@ var BillingDetailsSection = () => {
|
|
|
16215
16212
|
select: (data) => data?.invoice
|
|
16216
16213
|
}
|
|
16217
16214
|
);
|
|
16218
|
-
(0,
|
|
16215
|
+
(0, import_react41.useEffect)(() => {
|
|
16219
16216
|
if (error) {
|
|
16220
16217
|
console.error("Error fetching upcoming invoice:", error);
|
|
16221
16218
|
}
|
|
@@ -16303,14 +16300,14 @@ function OrgSidePanel({ organization }) {
|
|
|
16303
16300
|
}
|
|
16304
16301
|
|
|
16305
16302
|
// admin/views/organizations/details/layout/index.tsx
|
|
16306
|
-
var
|
|
16303
|
+
var import_react45 = require("react");
|
|
16307
16304
|
var import_icons6 = require("@raystack/apsara/icons");
|
|
16308
16305
|
|
|
16309
16306
|
// admin/views/organizations/details/edit/kyc.tsx
|
|
16310
16307
|
var import_apsara78 = require("@raystack/apsara");
|
|
16311
16308
|
|
|
16312
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16313
|
-
var digest54 = "
|
|
16309
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-ScFNSdrOzIxf/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16310
|
+
var digest54 = "d5bb8d53beb4f196bc12cdcf7b90621dabb0d16a0392fb71f111a7ca52bca7c5";
|
|
16314
16311
|
var css54 = `._drawer-content_1o0os_1 {
|
|
16315
16312
|
min-width: 500px;
|
|
16316
16313
|
padding: 0;
|
|
@@ -16363,7 +16360,7 @@ var css54 = `._drawer-content_1o0os_1 {
|
|
|
16363
16360
|
var edit_module_css_default = { "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" };
|
|
16364
16361
|
|
|
16365
16362
|
// admin/views/organizations/details/edit/kyc.tsx
|
|
16366
|
-
var
|
|
16363
|
+
var import_react42 = require("react");
|
|
16367
16364
|
var import_react_hook_form9 = require("react-hook-form");
|
|
16368
16365
|
var import_zod11 = require("@hookform/resolvers/zod");
|
|
16369
16366
|
var import_connect_query28 = require("@connectrpc/connect-query");
|
|
@@ -16384,7 +16381,7 @@ var kycUpdateSchema = external_exports.object({
|
|
|
16384
16381
|
}
|
|
16385
16382
|
});
|
|
16386
16383
|
function EditKYCPanel({ onClose }) {
|
|
16387
|
-
const { organization, kycDetails, updateKYCDetails } = (0,
|
|
16384
|
+
const { organization, kycDetails, updateKYCDetails } = (0, import_react42.useContext)(OrganizationContext);
|
|
16388
16385
|
const queryClient = (0, import_react_query10.useQueryClient)();
|
|
16389
16386
|
const transport = (0, import_connect_query28.useTransport)();
|
|
16390
16387
|
const orgId = organization?.id || "";
|
|
@@ -16545,10 +16542,10 @@ function EditKYCPanel({ onClose }) {
|
|
|
16545
16542
|
}
|
|
16546
16543
|
|
|
16547
16544
|
// admin/views/organizations/details/edit/organization.tsx
|
|
16548
|
-
var
|
|
16545
|
+
var import_react43 = require("react");
|
|
16549
16546
|
|
|
16550
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16551
|
-
var digest55 = "
|
|
16547
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-7z6CJMbovVHM/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16548
|
+
var digest55 = "f46aeac9308d3de189a182d58f4b9f1eddd90a0e1dc02095ba66aaa0527dc388";
|
|
16552
16549
|
var css55 = `._drawer-content_1o0os_1 {
|
|
16553
16550
|
min-width: 500px;
|
|
16554
16551
|
padding: 0;
|
|
@@ -16646,12 +16643,12 @@ function getDefaultValue(organization, industries) {
|
|
|
16646
16643
|
}
|
|
16647
16644
|
function EditOrganizationPanel({ onClose }) {
|
|
16648
16645
|
const t = useTerminology();
|
|
16649
|
-
const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = (0,
|
|
16650
|
-
const [countries, setCountries] = (0,
|
|
16646
|
+
const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = (0, import_react43.useContext)(OrganizationContext);
|
|
16647
|
+
const [countries, setCountries] = (0, import_react43.useState)(countriesFromContext);
|
|
16651
16648
|
const queryClient = (0, import_react_query11.useQueryClient)();
|
|
16652
16649
|
const transport = (0, import_connect_query29.useTransport)();
|
|
16653
16650
|
const orgId = organization?.id || "";
|
|
16654
|
-
(0,
|
|
16651
|
+
(0, import_react43.useEffect)(() => {
|
|
16655
16652
|
if (countriesFromContext.length > 0)
|
|
16656
16653
|
setCountries(countriesFromContext);
|
|
16657
16654
|
}, [countriesFromContext]);
|
|
@@ -16683,7 +16680,7 @@ function EditOrganizationPanel({ onClose }) {
|
|
|
16683
16680
|
onClose();
|
|
16684
16681
|
}
|
|
16685
16682
|
});
|
|
16686
|
-
(0,
|
|
16683
|
+
(0, import_react43.useEffect)(() => {
|
|
16687
16684
|
if (mutationError) {
|
|
16688
16685
|
if (mutationError.message?.includes("already exists")) {
|
|
16689
16686
|
setError("name", { message: `${t.organization({ case: "capital" })} name already exists` });
|
|
@@ -16910,8 +16907,8 @@ function EditOrganizationPanel({ onClose }) {
|
|
|
16910
16907
|
// admin/views/organizations/details/edit/billing.tsx
|
|
16911
16908
|
var import_apsara80 = require("@raystack/apsara");
|
|
16912
16909
|
|
|
16913
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16914
|
-
var digest56 = "
|
|
16910
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-IZe3EJ50UQHw/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16911
|
+
var digest56 = "26be965bec5dc1fefc507884d1adab5ab6248f401d44d1e022b6a16751132b2c";
|
|
16915
16912
|
var css56 = `._drawer-content_1o0os_1 {
|
|
16916
16913
|
min-width: 500px;
|
|
16917
16914
|
padding: 0;
|
|
@@ -16964,7 +16961,7 @@ var css56 = `._drawer-content_1o0os_1 {
|
|
|
16964
16961
|
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" };
|
|
16965
16962
|
|
|
16966
16963
|
// admin/views/organizations/details/edit/billing.tsx
|
|
16967
|
-
var
|
|
16964
|
+
var import_react44 = require("react");
|
|
16968
16965
|
var import_react_hook_form11 = require("react-hook-form");
|
|
16969
16966
|
var import_zod15 = require("@hookform/resolvers/zod");
|
|
16970
16967
|
var import_connect_query30 = require("@connectrpc/connect-query");
|
|
@@ -17012,7 +17009,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17012
17009
|
billingAccountDetails,
|
|
17013
17010
|
isBillingAccountLoading: isLoading,
|
|
17014
17011
|
fetchBillingAccountDetails
|
|
17015
|
-
} = (0,
|
|
17012
|
+
} = (0, import_react44.useContext)(OrganizationContext);
|
|
17016
17013
|
const organizationId = billingAccount?.orgId || "";
|
|
17017
17014
|
const billingId = billingAccount?.id || "";
|
|
17018
17015
|
const {
|
|
@@ -17025,7 +17022,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17025
17022
|
} = (0, import_react_hook_form11.useForm)({
|
|
17026
17023
|
resolver: (0, import_zod15.zodResolver)(billingDetailsUpdateSchema)
|
|
17027
17024
|
});
|
|
17028
|
-
const billingDetailsData = (0,
|
|
17025
|
+
const billingDetailsData = (0, import_react44.useMemo)(() => {
|
|
17029
17026
|
const creditMin = billingAccountDetails?.creditMin || 0n;
|
|
17030
17027
|
const absoluteCreditMin = creditMin < 0n ? creditMin * BigInt(-1) : creditMin;
|
|
17031
17028
|
const dueInDays = billingAccountDetails?.dueInDays || 0n;
|
|
@@ -17036,7 +17033,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17036
17033
|
dueInDays: dueInDays.toString()
|
|
17037
17034
|
};
|
|
17038
17035
|
}, [billingAccountDetails]);
|
|
17039
|
-
(0,
|
|
17036
|
+
(0, import_react44.useEffect)(() => {
|
|
17040
17037
|
if (billingDetailsData) {
|
|
17041
17038
|
reset(billingDetailsData);
|
|
17042
17039
|
}
|
|
@@ -17074,7 +17071,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17074
17071
|
console.error("Failed to update billing details:", error);
|
|
17075
17072
|
}
|
|
17076
17073
|
};
|
|
17077
|
-
const onValueChange = (0,
|
|
17074
|
+
const onValueChange = (0, import_react44.useCallback)((value) => {
|
|
17078
17075
|
const paymentType = value;
|
|
17079
17076
|
setValue("tokenPaymentType", paymentType);
|
|
17080
17077
|
if (paymentType === "prepaid") {
|
|
@@ -17208,10 +17205,10 @@ var OrganizationDetailsLayout = ({
|
|
|
17208
17205
|
onNavigate
|
|
17209
17206
|
}) => {
|
|
17210
17207
|
const t = useTerminology();
|
|
17211
|
-
const [showSidePanel, setShowSidePanel] = (0,
|
|
17212
|
-
const [showKYCPanel, setShowKYCPanel] = (0,
|
|
17213
|
-
const [showEditOrgPanel, setShowEditOrgPanel] = (0,
|
|
17214
|
-
const [showEditBillingPanel, setShowEditBillingPanel] = (0,
|
|
17208
|
+
const [showSidePanel, setShowSidePanel] = (0, import_react45.useState)(true);
|
|
17209
|
+
const [showKYCPanel, setShowKYCPanel] = (0, import_react45.useState)(false);
|
|
17210
|
+
const [showEditOrgPanel, setShowEditOrgPanel] = (0, import_react45.useState)(false);
|
|
17211
|
+
const [showEditBillingPanel, setShowEditBillingPanel] = (0, import_react45.useState)(false);
|
|
17215
17212
|
function toggleSidePanel() {
|
|
17216
17213
|
setShowSidePanel(!showSidePanel);
|
|
17217
17214
|
}
|
|
@@ -17301,8 +17298,8 @@ var OrganizationDetailsView = ({
|
|
|
17301
17298
|
onNavigate,
|
|
17302
17299
|
children
|
|
17303
17300
|
}) => {
|
|
17304
|
-
const [isSearchVisible, setIsSearchVisible] = (0,
|
|
17305
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
17301
|
+
const [isSearchVisible, setIsSearchVisible] = (0, import_react46.useState)(false);
|
|
17302
|
+
const [searchQuery, setSearchQuery] = (0, import_react46.useState)("");
|
|
17306
17303
|
const queryClient = (0, import_react_query12.useQueryClient)();
|
|
17307
17304
|
const transport = (0, import_connect_query31.useTransport)();
|
|
17308
17305
|
const {
|
|
@@ -17335,7 +17332,7 @@ var OrganizationDetailsView = ({
|
|
|
17335
17332
|
enabled: !!organizationId
|
|
17336
17333
|
}
|
|
17337
17334
|
);
|
|
17338
|
-
const kycDetails = (0,
|
|
17335
|
+
const kycDetails = (0, import_react46.useMemo)(() => kycData?.organizationKyc, [kycData]);
|
|
17339
17336
|
function updateKYCDetails(kyc) {
|
|
17340
17337
|
if (!organizationId)
|
|
17341
17338
|
return;
|
|
@@ -17440,7 +17437,7 @@ var OrganizationDetailsView = ({
|
|
|
17440
17437
|
select: (data) => String(data?.balance?.amount || "0")
|
|
17441
17438
|
}
|
|
17442
17439
|
);
|
|
17443
|
-
(0,
|
|
17440
|
+
(0, import_react46.useEffect)(() => {
|
|
17444
17441
|
if (organizationError) {
|
|
17445
17442
|
console.error("Failed to fetch organization:", organizationError);
|
|
17446
17443
|
}
|
|
@@ -17529,8 +17526,8 @@ var OrganizationDetailsView = ({
|
|
|
17529
17526
|
// admin/views/organizations/details/security/index.tsx
|
|
17530
17527
|
var import_apsara84 = require("@raystack/apsara");
|
|
17531
17528
|
|
|
17532
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17533
|
-
var digest57 = "
|
|
17529
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-VPwr5G1MM3DT/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
17530
|
+
var digest57 = "5eb8e55f417d44264efaed090249dd96e72bfd5a78a68922334250c76dcbff84";
|
|
17534
17531
|
var css57 = `._container_1wkae_1 {
|
|
17535
17532
|
width: 100%;
|
|
17536
17533
|
}
|
|
@@ -17571,11 +17568,11 @@ var css57 = `._container_1wkae_1 {
|
|
|
17571
17568
|
var security_module_css_default2 = { "container": "_container_1wkae_1", "content": "_content_1wkae_5", "domains-list": "_domains-list_1wkae_11", "domainsList": "_domains-list_1wkae_11", "domains-list-item": "_domains-list-item_1wkae_18", "domainsListItem": "_domains-list-item_1wkae_18" };
|
|
17572
17569
|
|
|
17573
17570
|
// admin/views/organizations/details/security/index.tsx
|
|
17574
|
-
var
|
|
17571
|
+
var import_react49 = require("react");
|
|
17575
17572
|
|
|
17576
17573
|
// admin/views/organizations/details/security/block-organization.tsx
|
|
17577
17574
|
var import_apsara82 = require("@raystack/apsara");
|
|
17578
|
-
var
|
|
17575
|
+
var import_react47 = require("react");
|
|
17579
17576
|
var import_connect_query32 = require("@connectrpc/connect-query");
|
|
17580
17577
|
var import_frontier36 = require("@raystack/proton/frontier");
|
|
17581
17578
|
var import_protobuf20 = require("@bufbuild/protobuf");
|
|
@@ -17583,10 +17580,10 @@ var import_react_query13 = require("@tanstack/react-query");
|
|
|
17583
17580
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
17584
17581
|
var BlockOrganizationDialog = () => {
|
|
17585
17582
|
const t = useTerminology();
|
|
17586
|
-
const { organization } = (0,
|
|
17583
|
+
const { organization } = (0, import_react47.useContext)(OrganizationContext);
|
|
17587
17584
|
const queryClient = (0, import_react_query13.useQueryClient)();
|
|
17588
17585
|
const transport = (0, import_connect_query32.useTransport)();
|
|
17589
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
17586
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react47.useState)(false);
|
|
17590
17587
|
const { mutateAsync: disableOrganization, isPending: isDisabling } = (0, import_connect_query32.useMutation)(
|
|
17591
17588
|
import_frontier36.FrontierServiceQueries.disableOrganization,
|
|
17592
17589
|
{
|
|
@@ -17723,8 +17720,8 @@ var BlockOrganizationSection = () => {
|
|
|
17723
17720
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17724
17721
|
var import_apsara83 = require("@raystack/apsara");
|
|
17725
17722
|
|
|
17726
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17727
|
-
var digest58 = "
|
|
17723
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-RqOKdnMjtjVH/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
17724
|
+
var digest58 = "c777e4d94d48e7f2f853a95116592ecb4a698d82a45d4e6a54fb10eee6c46959";
|
|
17728
17725
|
var css58 = `._container_1wkae_1 {
|
|
17729
17726
|
width: 100%;
|
|
17730
17727
|
}
|
|
@@ -17765,7 +17762,7 @@ var css58 = `._container_1wkae_1 {
|
|
|
17765
17762
|
var security_module_css_default3 = { "container": "_container_1wkae_1", "content": "_content_1wkae_5", "domains-list": "_domains-list_1wkae_11", "domainsList": "_domains-list_1wkae_11", "domains-list-item": "_domains-list-item_1wkae_18", "domainsListItem": "_domains-list-item_1wkae_18" };
|
|
17766
17763
|
|
|
17767
17764
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17768
|
-
var
|
|
17765
|
+
var import_react48 = require("react");
|
|
17769
17766
|
var import_connect_query33 = require("@connectrpc/connect-query");
|
|
17770
17767
|
var import_react_query14 = require("@tanstack/react-query");
|
|
17771
17768
|
var import_frontier37 = require("@raystack/proton/frontier");
|
|
@@ -17774,8 +17771,8 @@ var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
|
17774
17771
|
var DeleteDomainDialog = ({
|
|
17775
17772
|
domain
|
|
17776
17773
|
}) => {
|
|
17777
|
-
const { organization } = (0,
|
|
17778
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
17774
|
+
const { organization } = (0, import_react48.useContext)(OrganizationContext);
|
|
17775
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react48.useState)(false);
|
|
17779
17776
|
const queryClient = (0, import_react_query14.useQueryClient)();
|
|
17780
17777
|
const transport = (0, import_connect_query33.useTransport)();
|
|
17781
17778
|
const { mutateAsync: deleteDomain, isPending } = (0, import_connect_query33.useMutation)(
|
|
@@ -17882,7 +17879,7 @@ var DomainsList = ({
|
|
|
17882
17879
|
var import_connect_query34 = require("@connectrpc/connect-query");
|
|
17883
17880
|
var import_frontier38 = require("@raystack/proton/frontier");
|
|
17884
17881
|
var import_protobuf22 = require("@bufbuild/protobuf");
|
|
17885
|
-
var
|
|
17882
|
+
var import_react50 = require("react");
|
|
17886
17883
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
17887
17884
|
var AddDomainSection = () => {
|
|
17888
17885
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_apsara84.Flex, { gap: 5, justify: "between", children: [
|
|
@@ -17905,7 +17902,7 @@ var AddDomainSection = () => {
|
|
|
17905
17902
|
] });
|
|
17906
17903
|
};
|
|
17907
17904
|
var OrganizationSecurity = () => {
|
|
17908
|
-
const { organization } = (0,
|
|
17905
|
+
const { organization } = (0, import_react49.useContext)(OrganizationContext);
|
|
17909
17906
|
const { data: domains, isLoading, error } = (0, import_connect_query34.useQuery)(
|
|
17910
17907
|
import_frontier38.FrontierServiceQueries.listOrganizationDomains,
|
|
17911
17908
|
(0, import_protobuf22.create)(import_frontier38.ListOrganizationDomainsRequestSchema, {
|
|
@@ -17916,7 +17913,7 @@ var OrganizationSecurity = () => {
|
|
|
17916
17913
|
select: (data) => data?.domains || []
|
|
17917
17914
|
}
|
|
17918
17915
|
);
|
|
17919
|
-
(0,
|
|
17916
|
+
(0, import_react50.useEffect)(() => {
|
|
17920
17917
|
if (error) {
|
|
17921
17918
|
import_apsara84.toast.error("Something went wrong", {
|
|
17922
17919
|
description: "Unable to fetch domains"
|
|
@@ -17945,8 +17942,8 @@ var OrganizationSecurity = () => {
|
|
|
17945
17942
|
// admin/views/organizations/details/members/index.tsx
|
|
17946
17943
|
var import_apsara87 = require("@raystack/apsara");
|
|
17947
17944
|
|
|
17948
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17949
|
-
var digest59 = "
|
|
17945
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-ExbAQe0bW66a/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
17946
|
+
var digest59 = "eb05546b7309238712826e1871021670ad4d81359666872d7ed8be0121093c8c";
|
|
17950
17947
|
var css59 = `._container_6bi1j_1 {
|
|
17951
17948
|
width: 100%;
|
|
17952
17949
|
}
|
|
@@ -17998,13 +17995,13 @@ var css59 = `._container_6bi1j_1 {
|
|
|
17998
17995
|
var members_module_css_default = { "container": "_container_6bi1j_1", "name-column": "_name-column_6bi1j_5", "nameColumn": "_name-column_6bi1j_5", "empty-state": "_empty-state_6bi1j_9", "emptyState": "_empty-state_6bi1j_9", "empty-state-subheading": "_empty-state-subheading_6bi1j_13", "emptyStateSubheading": "_empty-state-subheading_6bi1j_13", "table": "_table_6bi1j_18", "table-wrapper": "_table-wrapper_6bi1j_23", "tableWrapper": "_table-wrapper_6bi1j_23", "table-header": "_table-header_6bi1j_29", "tableHeader": "_table-header_6bi1j_29", "table-action-column": "_table-action-column_6bi1j_34", "tableActionColumn": "_table-action-column_6bi1j_34" };
|
|
17999
17996
|
|
|
18000
17997
|
// admin/views/organizations/details/members/index.tsx
|
|
18001
|
-
var
|
|
17998
|
+
var import_react52 = require("react");
|
|
18002
17999
|
|
|
18003
18000
|
// admin/views/organizations/details/members/columns.tsx
|
|
18004
18001
|
var import_apsara85 = require("@raystack/apsara");
|
|
18005
18002
|
|
|
18006
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18007
|
-
var digest60 = "
|
|
18003
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Gj2ifM22Z0SU/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
18004
|
+
var digest60 = "092281680d9bad6d979f1154c4be8a371e3db3e542cf72ebc957b38a8f670a06";
|
|
18008
18005
|
var css60 = `._container_6bi1j_1 {
|
|
18009
18006
|
width: 100%;
|
|
18010
18007
|
}
|
|
@@ -18279,12 +18276,12 @@ var RemoveMember = ({
|
|
|
18279
18276
|
};
|
|
18280
18277
|
|
|
18281
18278
|
// ../node_modules/.pnpm/usehooks-ts@3.1.1_react@19.2.4/node_modules/usehooks-ts/dist/index.js
|
|
18282
|
-
var
|
|
18279
|
+
var import_react51 = require("react");
|
|
18283
18280
|
var import_lodash2 = __toESM(require_lodash(), 1);
|
|
18284
18281
|
function useUnmount(func) {
|
|
18285
|
-
const funcRef = (0,
|
|
18282
|
+
const funcRef = (0, import_react51.useRef)(func);
|
|
18286
18283
|
funcRef.current = func;
|
|
18287
|
-
(0,
|
|
18284
|
+
(0, import_react51.useEffect)(
|
|
18288
18285
|
() => () => {
|
|
18289
18286
|
funcRef.current();
|
|
18290
18287
|
},
|
|
@@ -18292,13 +18289,13 @@ function useUnmount(func) {
|
|
|
18292
18289
|
);
|
|
18293
18290
|
}
|
|
18294
18291
|
function useDebounceCallback(func, delay = 500, options) {
|
|
18295
|
-
const debouncedFunc = (0,
|
|
18292
|
+
const debouncedFunc = (0, import_react51.useRef)();
|
|
18296
18293
|
useUnmount(() => {
|
|
18297
18294
|
if (debouncedFunc.current) {
|
|
18298
18295
|
debouncedFunc.current.cancel();
|
|
18299
18296
|
}
|
|
18300
18297
|
});
|
|
18301
|
-
const debounced = (0,
|
|
18298
|
+
const debounced = (0, import_react51.useMemo)(() => {
|
|
18302
18299
|
const debouncedFuncInstance = (0, import_lodash2.default)(func, delay, options);
|
|
18303
18300
|
const wrappedFunc = (...args) => {
|
|
18304
18301
|
return debouncedFuncInstance(...args);
|
|
@@ -18314,7 +18311,7 @@ function useDebounceCallback(func, delay = 500, options) {
|
|
|
18314
18311
|
};
|
|
18315
18312
|
return wrappedFunc;
|
|
18316
18313
|
}, [func, delay, options]);
|
|
18317
|
-
(0,
|
|
18314
|
+
(0, import_react51.useEffect)(() => {
|
|
18318
18315
|
debouncedFunc.current = (0, import_lodash2.default)(func, delay, options);
|
|
18319
18316
|
}, [func, delay, options]);
|
|
18320
18317
|
return debounced;
|
|
@@ -18322,8 +18319,8 @@ function useDebounceCallback(func, delay = 500, options) {
|
|
|
18322
18319
|
function useDebounceValue(initialValue, delay, options) {
|
|
18323
18320
|
const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);
|
|
18324
18321
|
const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;
|
|
18325
|
-
const [debouncedValue, setDebouncedValue] = (0,
|
|
18326
|
-
const previousValueRef = (0,
|
|
18322
|
+
const [debouncedValue, setDebouncedValue] = (0, import_react51.useState)(unwrappedInitialValue);
|
|
18323
|
+
const previousValueRef = (0, import_react51.useRef)(unwrappedInitialValue);
|
|
18327
18324
|
const updateDebouncedValue = useDebounceCallback(
|
|
18328
18325
|
setDebouncedValue,
|
|
18329
18326
|
delay,
|
|
@@ -18380,7 +18377,7 @@ var ErrorState = () => {
|
|
|
18380
18377
|
);
|
|
18381
18378
|
};
|
|
18382
18379
|
function OrganizationMembersView() {
|
|
18383
|
-
const { roles = [], organization, search } = (0,
|
|
18380
|
+
const { roles = [], organization, search } = (0, import_react52.useContext)(OrganizationContext);
|
|
18384
18381
|
const {
|
|
18385
18382
|
onChange: onSearchChange,
|
|
18386
18383
|
setVisibility: setSearchVisibility,
|
|
@@ -18389,11 +18386,11 @@ function OrganizationMembersView() {
|
|
|
18389
18386
|
const queryClient = (0, import_react_query15.useQueryClient)();
|
|
18390
18387
|
const transport = (0, import_connect_query36.useTransport)();
|
|
18391
18388
|
const organizationId = organization?.id || "";
|
|
18392
|
-
const [assignRoleConfig, setAssignRoleConfig] = (0,
|
|
18393
|
-
const [removeMemberConfig, setRemoveMemberConfig] = (0,
|
|
18389
|
+
const [assignRoleConfig, setAssignRoleConfig] = (0, import_react52.useState)({ isOpen: false, user: null });
|
|
18390
|
+
const [removeMemberConfig, setRemoveMemberConfig] = (0, import_react52.useState)({ isOpen: false, user: null });
|
|
18394
18391
|
const title = `Members | ${organization?.title} | Organizations`;
|
|
18395
|
-
const [tableQuery, setTableQuery] = (0,
|
|
18396
|
-
const computedQuery = (0,
|
|
18392
|
+
const [tableQuery, setTableQuery] = (0, import_react52.useState)(INITIAL_QUERY5);
|
|
18393
|
+
const computedQuery = (0, import_react52.useMemo)(() => {
|
|
18397
18394
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS2);
|
|
18398
18395
|
return {
|
|
18399
18396
|
...tempQuery,
|
|
@@ -18431,7 +18428,7 @@ function OrganizationMembersView() {
|
|
|
18431
18428
|
await fetchNextPage();
|
|
18432
18429
|
}
|
|
18433
18430
|
};
|
|
18434
|
-
(0,
|
|
18431
|
+
(0, import_react52.useEffect)(() => {
|
|
18435
18432
|
setSearchVisibility(true);
|
|
18436
18433
|
return () => {
|
|
18437
18434
|
onSearchChange("");
|
|
@@ -18529,8 +18526,8 @@ function OrganizationMembersView() {
|
|
|
18529
18526
|
// admin/views/organizations/details/projects/index.tsx
|
|
18530
18527
|
var import_apsara96 = require("@raystack/apsara");
|
|
18531
18528
|
|
|
18532
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18533
|
-
var digest61 = "
|
|
18529
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-5Wh2if818Acm/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
18530
|
+
var digest61 = "1d00e5a79a06582d3779e2f9dc15749cc5d05cef0e9bb058c4fe4464710fb79f";
|
|
18534
18531
|
var css61 = `._container_1rf4u_1 {
|
|
18535
18532
|
width: 100%;
|
|
18536
18533
|
}
|
|
@@ -18587,13 +18584,13 @@ var css61 = `._container_1rf4u_1 {
|
|
|
18587
18584
|
var projects_module_css_default = { "container": "_container_1rf4u_1", "title-column": "_title-column_1rf4u_5", "titleColumn": "_title-column_1rf4u_5", "empty-state": "_empty-state_1rf4u_9", "emptyState": "_empty-state_1rf4u_9", "empty-state-subheading": "_empty-state-subheading_1rf4u_13", "emptyStateSubheading": "_empty-state-subheading_1rf4u_13", "table": "_table_1rf4u_18", "table-wrapper": "_table-wrapper_1rf4u_23", "tableWrapper": "_table-wrapper_1rf4u_23", "table-header": "_table-header_1rf4u_29", "tableHeader": "_table-header_1rf4u_29", "table-action-column": "_table-action-column_1rf4u_34", "tableActionColumn": "_table-action-column_1rf4u_34", "flex1": "_flex1_1rf4u_39" };
|
|
18588
18585
|
|
|
18589
18586
|
// admin/views/organizations/details/projects/index.tsx
|
|
18590
|
-
var
|
|
18587
|
+
var import_react57 = require("react");
|
|
18591
18588
|
|
|
18592
18589
|
// admin/views/organizations/details/projects/columns.tsx
|
|
18593
18590
|
var import_apsara90 = require("@raystack/apsara");
|
|
18594
18591
|
|
|
18595
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18596
|
-
var digest62 = "
|
|
18592
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-RwBzMy0OcQbT/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
18593
|
+
var digest62 = "9bb33667463a6d59b42ce653826b414390c6c55ec77c1d396c8387d62f608037";
|
|
18597
18594
|
var css62 = `._container_1rf4u_1 {
|
|
18598
18595
|
width: 100%;
|
|
18599
18596
|
}
|
|
@@ -18769,10 +18766,10 @@ function RenameProjectDialog({
|
|
|
18769
18766
|
}
|
|
18770
18767
|
|
|
18771
18768
|
// admin/views/organizations/details/projects/columns.tsx
|
|
18772
|
-
var
|
|
18769
|
+
var import_react54 = require("react");
|
|
18773
18770
|
|
|
18774
18771
|
// admin/views/organizations/details/projects/use-add-project-members.tsx
|
|
18775
|
-
var
|
|
18772
|
+
var import_react53 = require("react");
|
|
18776
18773
|
var import_apsara89 = require("@raystack/apsara");
|
|
18777
18774
|
var import_connect_query38 = require("@connectrpc/connect-query");
|
|
18778
18775
|
var import_frontier42 = require("@raystack/proton/frontier");
|
|
@@ -18780,8 +18777,8 @@ var import_protobuf25 = require("@bufbuild/protobuf");
|
|
|
18780
18777
|
function useAddProjectMembers({ projectId }) {
|
|
18781
18778
|
const t = useTerminology();
|
|
18782
18779
|
const memberLabel = t.member({ case: "capital" });
|
|
18783
|
-
const { orgMembersMap } = (0,
|
|
18784
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
18780
|
+
const { orgMembersMap } = (0, import_react53.useContext)(OrganizationContext);
|
|
18781
|
+
const [searchQuery, setSearchQuery] = (0, import_react53.useState)("");
|
|
18785
18782
|
const { data: projectMembers, isLoading, refetch } = (0, import_connect_query38.useQuery)(
|
|
18786
18783
|
import_frontier42.FrontierServiceQueries.listProjectUsers,
|
|
18787
18784
|
(0, import_protobuf25.create)(import_frontier42.ListProjectUsersRequestSchema, { id: projectId }),
|
|
@@ -18790,7 +18787,7 @@ function useAddProjectMembers({ projectId }) {
|
|
|
18790
18787
|
select: (data) => data?.users || []
|
|
18791
18788
|
}
|
|
18792
18789
|
);
|
|
18793
|
-
const nonMembers = (0,
|
|
18790
|
+
const nonMembers = (0, import_react53.useMemo)(() => {
|
|
18794
18791
|
if (!projectMembers)
|
|
18795
18792
|
return [];
|
|
18796
18793
|
const memberSet = new Set(projectMembers.map((member) => member.id));
|
|
@@ -18800,40 +18797,53 @@ function useAddProjectMembers({ projectId }) {
|
|
|
18800
18797
|
return aName < bName ? -1 : 1;
|
|
18801
18798
|
});
|
|
18802
18799
|
}, [projectMembers, orgMembersMap]);
|
|
18803
|
-
const eligibleMembers = (0,
|
|
18800
|
+
const eligibleMembers = (0, import_react53.useMemo)(() => {
|
|
18804
18801
|
return searchQuery ? nonMembers.filter((member) => {
|
|
18805
18802
|
const name = member.title || member.email || "";
|
|
18806
18803
|
return name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
18807
18804
|
}) : nonMembers;
|
|
18808
18805
|
}, [nonMembers, searchQuery]);
|
|
18809
|
-
const {
|
|
18810
|
-
import_frontier42.FrontierServiceQueries.
|
|
18806
|
+
const { data: rolesData } = (0, import_connect_query38.useQuery)(
|
|
18807
|
+
import_frontier42.FrontierServiceQueries.listRoles,
|
|
18808
|
+
(0, import_protobuf25.create)(import_frontier42.ListRolesRequestSchema, {
|
|
18809
|
+
state: "enabled",
|
|
18810
|
+
scopes: [SCOPES.PROJECT]
|
|
18811
|
+
}),
|
|
18812
|
+
{ enabled: !!projectId }
|
|
18813
|
+
);
|
|
18814
|
+
const viewerRoleId = (0, import_react53.useMemo)(
|
|
18815
|
+
() => rolesData?.roles?.find((r) => r.name === DEFAULT_ROLES.PROJECT_VIEWER)?.id ?? "",
|
|
18816
|
+
[rolesData]
|
|
18817
|
+
);
|
|
18818
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query38.useMutation)(
|
|
18819
|
+
import_frontier42.FrontierServiceQueries.setProjectMemberRole
|
|
18811
18820
|
);
|
|
18812
|
-
const addMember = (0,
|
|
18821
|
+
const addMember = (0, import_react53.useCallback)(
|
|
18813
18822
|
async (userId) => {
|
|
18814
|
-
if (!userId || !projectId)
|
|
18823
|
+
if (!userId || !projectId || !viewerRoleId)
|
|
18815
18824
|
return;
|
|
18816
18825
|
try {
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
principal,
|
|
18824
|
-
resource
|
|
18825
|
-
}
|
|
18826
|
+
await setProjectMemberRole(
|
|
18827
|
+
(0, import_protobuf25.create)(import_frontier42.SetProjectMemberRoleRequestSchema, {
|
|
18828
|
+
projectId,
|
|
18829
|
+
principalId: userId,
|
|
18830
|
+
principalType: SCOPES.USER,
|
|
18831
|
+
roleId: viewerRoleId
|
|
18826
18832
|
})
|
|
18827
18833
|
);
|
|
18828
18834
|
import_apsara89.toast.success(`${memberLabel} added`);
|
|
18829
18835
|
await refetch();
|
|
18830
18836
|
return projectMembers;
|
|
18831
18837
|
} catch (error) {
|
|
18832
|
-
|
|
18833
|
-
|
|
18838
|
+
handleConnectError(error, {
|
|
18839
|
+
AlreadyExists: () => import_apsara89.toast.error(`${memberLabel} already exists in this project`),
|
|
18840
|
+
PermissionDenied: () => import_apsara89.toast.error("You don't have permission to perform this action"),
|
|
18841
|
+
InvalidArgument: (err) => import_apsara89.toast.error("Invalid input", { description: err.message }),
|
|
18842
|
+
Default: (err) => import_apsara89.toast.error("Something went wrong", { description: err.message })
|
|
18843
|
+
});
|
|
18834
18844
|
}
|
|
18835
18845
|
},
|
|
18836
|
-
[projectId,
|
|
18846
|
+
[projectId, setProjectMemberRole, refetch, projectMembers, memberLabel, viewerRoleId]
|
|
18837
18847
|
);
|
|
18838
18848
|
return {
|
|
18839
18849
|
isLoading,
|
|
@@ -18943,8 +18953,8 @@ function ProjectActions({
|
|
|
18943
18953
|
project,
|
|
18944
18954
|
handleProjectUpdate
|
|
18945
18955
|
}) {
|
|
18946
|
-
const [open, setOpen] = (0,
|
|
18947
|
-
const [isRenameDialogOpen, setIsRenameDialogOpen] = (0,
|
|
18956
|
+
const [open, setOpen] = (0, import_react54.useState)(false);
|
|
18957
|
+
const [isRenameDialogOpen, setIsRenameDialogOpen] = (0, import_react54.useState)(false);
|
|
18948
18958
|
const preventClickBubbling = (e) => {
|
|
18949
18959
|
e.stopPropagation();
|
|
18950
18960
|
};
|
|
@@ -19081,93 +19091,92 @@ var import_connect_query42 = require("@connectrpc/connect-query");
|
|
|
19081
19091
|
|
|
19082
19092
|
// admin/views/organizations/details/projects/members/index.tsx
|
|
19083
19093
|
var import_apsara95 = require("@raystack/apsara");
|
|
19084
|
-
var
|
|
19094
|
+
var import_react56 = require("react");
|
|
19085
19095
|
var import_frontier45 = require("@raystack/proton/frontier");
|
|
19086
19096
|
var import_protobuf28 = require("@bufbuild/protobuf");
|
|
19087
19097
|
var import_connect_query41 = require("@connectrpc/connect-query");
|
|
19088
19098
|
var import_hooks4 = require("@raystack/apsara/hooks");
|
|
19089
19099
|
|
|
19090
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19091
|
-
var digest63 = "
|
|
19092
|
-
var css63 = `.
|
|
19100
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-keOSMmrKLC2f/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19101
|
+
var digest63 = "f999b94e7b205ea09661d0c84ac2c71e5279c7adfb46f29dbb6511e547c69ef1";
|
|
19102
|
+
var css63 = `._flex1_1k2kc_1 {
|
|
19093
19103
|
flex: 1;
|
|
19094
19104
|
}
|
|
19095
19105
|
|
|
19096
|
-
._dialog-
|
|
19106
|
+
._dialog-content_1k2kc_5 {
|
|
19097
19107
|
height: 70vh;
|
|
19098
19108
|
width: 80vw;
|
|
19099
19109
|
}
|
|
19100
19110
|
|
|
19101
|
-
._dialog-
|
|
19111
|
+
._dialog-body_1k2kc_10 {
|
|
19102
19112
|
height: 100%;
|
|
19103
19113
|
}
|
|
19104
19114
|
|
|
19105
|
-
._empty-
|
|
19115
|
+
._empty-state_1k2kc_14 {
|
|
19106
19116
|
height: 100%;
|
|
19107
19117
|
}
|
|
19108
19118
|
|
|
19109
|
-
._empty-state-
|
|
19119
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19110
19120
|
max-width: 360px;
|
|
19111
19121
|
text-wrap: auto;
|
|
19112
19122
|
}
|
|
19113
19123
|
|
|
19114
|
-
.
|
|
19124
|
+
._table_1k2kc_23 {
|
|
19115
19125
|
width: 100%;
|
|
19116
|
-
height: 100%;
|
|
19117
19126
|
table-layout: fixed;
|
|
19118
19127
|
}
|
|
19119
19128
|
|
|
19120
|
-
._table-
|
|
19129
|
+
._table-wrapper_1k2kc_28 {
|
|
19121
19130
|
/* Toolbar height */
|
|
19122
19131
|
max-height: calc(100% - 90px);
|
|
19123
19132
|
overflow: scroll;
|
|
19124
19133
|
}
|
|
19125
19134
|
|
|
19126
|
-
._table-
|
|
19135
|
+
._table-header_1k2kc_34 {
|
|
19127
19136
|
/* position: relative; */
|
|
19128
19137
|
z-index: 2;
|
|
19129
19138
|
}
|
|
19130
19139
|
|
|
19131
|
-
._table-
|
|
19140
|
+
._table-search_1k2kc_39 {
|
|
19132
19141
|
max-width: 360px;
|
|
19133
19142
|
}
|
|
19134
19143
|
|
|
19135
|
-
._table-content-
|
|
19144
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19136
19145
|
height: 100%;
|
|
19137
19146
|
}
|
|
19138
19147
|
|
|
19139
|
-
._table-action-
|
|
19148
|
+
._table-action-column_1k2kc_47 {
|
|
19140
19149
|
width: 24px;
|
|
19141
19150
|
}
|
|
19142
19151
|
|
|
19143
|
-
._table-action-
|
|
19152
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19144
19153
|
z-index: 10000;
|
|
19145
19154
|
min-width: 150px;
|
|
19146
19155
|
}
|
|
19147
19156
|
|
|
19148
|
-
._action-dialog-
|
|
19157
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19149
19158
|
z-index: 10001;
|
|
19150
19159
|
}
|
|
19151
19160
|
|
|
19152
|
-
._action-dialog-
|
|
19161
|
+
._action-dialog-content_1k2kc_60 {
|
|
19153
19162
|
z-index: 10002;
|
|
19154
19163
|
}
|
|
19155
19164
|
|
|
19156
|
-
._add-member-
|
|
19165
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19157
19166
|
width: 240px;
|
|
19158
19167
|
/* position: relative; */
|
|
19159
19168
|
}
|
|
19160
19169
|
|
|
19161
|
-
._add-member-dropdown-
|
|
19170
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19162
19171
|
width: 100%;
|
|
19163
19172
|
}
|
|
19164
|
-
|
|
19173
|
+
|
|
19174
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19165
19175
|
max-width: 100%;
|
|
19166
19176
|
overflow: hidden;
|
|
19167
19177
|
text-overflow: ellipsis;
|
|
19168
19178
|
white-space: nowrap;
|
|
19169
|
-
}
|
|
19170
|
-
`;
|
|
19179
|
+
}`;
|
|
19171
19180
|
(function() {
|
|
19172
19181
|
if (typeof document === "undefined") {
|
|
19173
19182
|
return;
|
|
@@ -19179,89 +19188,88 @@ var css63 = `._flex1_nxqqi_1 {
|
|
|
19179
19188
|
document.head.appendChild(el);
|
|
19180
19189
|
}
|
|
19181
19190
|
})();
|
|
19182
|
-
var members_module_css_default3 = { "flex1": "
|
|
19191
|
+
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" };
|
|
19183
19192
|
|
|
19184
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19185
|
-
var digest64 = "
|
|
19186
|
-
var css64 = `.
|
|
19193
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-9PYrEIB77r0G/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19194
|
+
var digest64 = "d4d14a74525ac9f986951d4528591f543effb867468793a785c8d0085516c552";
|
|
19195
|
+
var css64 = `._flex1_1k2kc_1 {
|
|
19187
19196
|
flex: 1;
|
|
19188
19197
|
}
|
|
19189
19198
|
|
|
19190
|
-
._dialog-
|
|
19199
|
+
._dialog-content_1k2kc_5 {
|
|
19191
19200
|
height: 70vh;
|
|
19192
19201
|
width: 80vw;
|
|
19193
19202
|
}
|
|
19194
19203
|
|
|
19195
|
-
._dialog-
|
|
19204
|
+
._dialog-body_1k2kc_10 {
|
|
19196
19205
|
height: 100%;
|
|
19197
19206
|
}
|
|
19198
19207
|
|
|
19199
|
-
._empty-
|
|
19208
|
+
._empty-state_1k2kc_14 {
|
|
19200
19209
|
height: 100%;
|
|
19201
19210
|
}
|
|
19202
19211
|
|
|
19203
|
-
._empty-state-
|
|
19212
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19204
19213
|
max-width: 360px;
|
|
19205
19214
|
text-wrap: auto;
|
|
19206
19215
|
}
|
|
19207
19216
|
|
|
19208
|
-
.
|
|
19217
|
+
._table_1k2kc_23 {
|
|
19209
19218
|
width: 100%;
|
|
19210
|
-
height: 100%;
|
|
19211
19219
|
table-layout: fixed;
|
|
19212
19220
|
}
|
|
19213
19221
|
|
|
19214
|
-
._table-
|
|
19222
|
+
._table-wrapper_1k2kc_28 {
|
|
19215
19223
|
/* Toolbar height */
|
|
19216
19224
|
max-height: calc(100% - 90px);
|
|
19217
19225
|
overflow: scroll;
|
|
19218
19226
|
}
|
|
19219
19227
|
|
|
19220
|
-
._table-
|
|
19228
|
+
._table-header_1k2kc_34 {
|
|
19221
19229
|
/* position: relative; */
|
|
19222
19230
|
z-index: 2;
|
|
19223
19231
|
}
|
|
19224
19232
|
|
|
19225
|
-
._table-
|
|
19233
|
+
._table-search_1k2kc_39 {
|
|
19226
19234
|
max-width: 360px;
|
|
19227
19235
|
}
|
|
19228
19236
|
|
|
19229
|
-
._table-content-
|
|
19237
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19230
19238
|
height: 100%;
|
|
19231
19239
|
}
|
|
19232
19240
|
|
|
19233
|
-
._table-action-
|
|
19241
|
+
._table-action-column_1k2kc_47 {
|
|
19234
19242
|
width: 24px;
|
|
19235
19243
|
}
|
|
19236
19244
|
|
|
19237
|
-
._table-action-
|
|
19245
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19238
19246
|
z-index: 10000;
|
|
19239
19247
|
min-width: 150px;
|
|
19240
19248
|
}
|
|
19241
19249
|
|
|
19242
|
-
._action-dialog-
|
|
19250
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19243
19251
|
z-index: 10001;
|
|
19244
19252
|
}
|
|
19245
19253
|
|
|
19246
|
-
._action-dialog-
|
|
19254
|
+
._action-dialog-content_1k2kc_60 {
|
|
19247
19255
|
z-index: 10002;
|
|
19248
19256
|
}
|
|
19249
19257
|
|
|
19250
|
-
._add-member-
|
|
19258
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19251
19259
|
width: 240px;
|
|
19252
19260
|
/* position: relative; */
|
|
19253
19261
|
}
|
|
19254
19262
|
|
|
19255
|
-
._add-member-dropdown-
|
|
19263
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19256
19264
|
width: 100%;
|
|
19257
19265
|
}
|
|
19258
|
-
|
|
19266
|
+
|
|
19267
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19259
19268
|
max-width: 100%;
|
|
19260
19269
|
overflow: hidden;
|
|
19261
19270
|
text-overflow: ellipsis;
|
|
19262
19271
|
white-space: nowrap;
|
|
19263
|
-
}
|
|
19264
|
-
`;
|
|
19272
|
+
}`;
|
|
19265
19273
|
(function() {
|
|
19266
19274
|
if (typeof document === "undefined") {
|
|
19267
19275
|
return;
|
|
@@ -19273,7 +19281,7 @@ var css64 = `._flex1_nxqqi_1 {
|
|
|
19273
19281
|
document.head.appendChild(el);
|
|
19274
19282
|
}
|
|
19275
19283
|
})();
|
|
19276
|
-
var members_module_css_default4 = { "flex1": "
|
|
19284
|
+
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" };
|
|
19277
19285
|
|
|
19278
19286
|
// admin/views/organizations/details/projects/members/columns.tsx
|
|
19279
19287
|
var import_apsara91 = require("@raystack/apsara");
|
|
@@ -19377,87 +19385,86 @@ var getColumns14 = ({
|
|
|
19377
19385
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19378
19386
|
var import_apsara92 = require("@raystack/apsara");
|
|
19379
19387
|
|
|
19380
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19381
|
-
var digest65 = "
|
|
19382
|
-
var css65 = `.
|
|
19388
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-uHN6rYEX34yI/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19389
|
+
var digest65 = "40b88d9961f75eb9599571a3c6fbd2f475d90414e1a235605dad43ef18a8d352";
|
|
19390
|
+
var css65 = `._flex1_1k2kc_1 {
|
|
19383
19391
|
flex: 1;
|
|
19384
19392
|
}
|
|
19385
19393
|
|
|
19386
|
-
._dialog-
|
|
19394
|
+
._dialog-content_1k2kc_5 {
|
|
19387
19395
|
height: 70vh;
|
|
19388
19396
|
width: 80vw;
|
|
19389
19397
|
}
|
|
19390
19398
|
|
|
19391
|
-
._dialog-
|
|
19399
|
+
._dialog-body_1k2kc_10 {
|
|
19392
19400
|
height: 100%;
|
|
19393
19401
|
}
|
|
19394
19402
|
|
|
19395
|
-
._empty-
|
|
19403
|
+
._empty-state_1k2kc_14 {
|
|
19396
19404
|
height: 100%;
|
|
19397
19405
|
}
|
|
19398
19406
|
|
|
19399
|
-
._empty-state-
|
|
19407
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19400
19408
|
max-width: 360px;
|
|
19401
19409
|
text-wrap: auto;
|
|
19402
19410
|
}
|
|
19403
19411
|
|
|
19404
|
-
.
|
|
19412
|
+
._table_1k2kc_23 {
|
|
19405
19413
|
width: 100%;
|
|
19406
|
-
height: 100%;
|
|
19407
19414
|
table-layout: fixed;
|
|
19408
19415
|
}
|
|
19409
19416
|
|
|
19410
|
-
._table-
|
|
19417
|
+
._table-wrapper_1k2kc_28 {
|
|
19411
19418
|
/* Toolbar height */
|
|
19412
19419
|
max-height: calc(100% - 90px);
|
|
19413
19420
|
overflow: scroll;
|
|
19414
19421
|
}
|
|
19415
19422
|
|
|
19416
|
-
._table-
|
|
19423
|
+
._table-header_1k2kc_34 {
|
|
19417
19424
|
/* position: relative; */
|
|
19418
19425
|
z-index: 2;
|
|
19419
19426
|
}
|
|
19420
19427
|
|
|
19421
|
-
._table-
|
|
19428
|
+
._table-search_1k2kc_39 {
|
|
19422
19429
|
max-width: 360px;
|
|
19423
19430
|
}
|
|
19424
19431
|
|
|
19425
|
-
._table-content-
|
|
19432
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19426
19433
|
height: 100%;
|
|
19427
19434
|
}
|
|
19428
19435
|
|
|
19429
|
-
._table-action-
|
|
19436
|
+
._table-action-column_1k2kc_47 {
|
|
19430
19437
|
width: 24px;
|
|
19431
19438
|
}
|
|
19432
19439
|
|
|
19433
|
-
._table-action-
|
|
19440
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19434
19441
|
z-index: 10000;
|
|
19435
19442
|
min-width: 150px;
|
|
19436
19443
|
}
|
|
19437
19444
|
|
|
19438
|
-
._action-dialog-
|
|
19445
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19439
19446
|
z-index: 10001;
|
|
19440
19447
|
}
|
|
19441
19448
|
|
|
19442
|
-
._action-dialog-
|
|
19449
|
+
._action-dialog-content_1k2kc_60 {
|
|
19443
19450
|
z-index: 10002;
|
|
19444
19451
|
}
|
|
19445
19452
|
|
|
19446
|
-
._add-member-
|
|
19453
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19447
19454
|
width: 240px;
|
|
19448
19455
|
/* position: relative; */
|
|
19449
19456
|
}
|
|
19450
19457
|
|
|
19451
|
-
._add-member-dropdown-
|
|
19458
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19452
19459
|
width: 100%;
|
|
19453
19460
|
}
|
|
19454
|
-
|
|
19461
|
+
|
|
19462
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19455
19463
|
max-width: 100%;
|
|
19456
19464
|
overflow: hidden;
|
|
19457
19465
|
text-overflow: ellipsis;
|
|
19458
19466
|
white-space: nowrap;
|
|
19459
|
-
}
|
|
19460
|
-
`;
|
|
19467
|
+
}`;
|
|
19461
19468
|
(function() {
|
|
19462
19469
|
if (typeof document === "undefined") {
|
|
19463
19470
|
return;
|
|
@@ -19469,21 +19476,17 @@ var css65 = `._flex1_nxqqi_1 {
|
|
|
19469
19476
|
document.head.appendChild(el);
|
|
19470
19477
|
}
|
|
19471
19478
|
})();
|
|
19472
|
-
var members_module_css_default5 = { "flex1": "
|
|
19479
|
+
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" };
|
|
19473
19480
|
|
|
19474
19481
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19475
|
-
var import_react56 = require("react");
|
|
19476
19482
|
var import_frontier43 = require("@raystack/proton/frontier");
|
|
19477
19483
|
var import_protobuf26 = require("@bufbuild/protobuf");
|
|
19478
19484
|
var import_connect_query39 = require("@connectrpc/connect-query");
|
|
19479
|
-
var import_connect3 = require("@connectrpc/connect");
|
|
19480
19485
|
var import_react_hook_form13 = require("react-hook-form");
|
|
19481
19486
|
var import_zod18 = require("@hookform/resolvers/zod");
|
|
19482
19487
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
19483
19488
|
var formSchema2 = external_exports.object({
|
|
19484
|
-
|
|
19485
|
-
message: "At least one role must be selected"
|
|
19486
|
-
})
|
|
19489
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
19487
19490
|
});
|
|
19488
19491
|
var AssignRole2 = ({
|
|
19489
19492
|
roles = [],
|
|
@@ -19492,84 +19495,36 @@ var AssignRole2 = ({
|
|
|
19492
19495
|
onRoleUpdate,
|
|
19493
19496
|
onClose
|
|
19494
19497
|
}) => {
|
|
19495
|
-
const
|
|
19498
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
19496
19499
|
const {
|
|
19497
19500
|
handleSubmit,
|
|
19498
19501
|
watch,
|
|
19499
19502
|
setValue,
|
|
19500
|
-
formState: { isSubmitting, errors }
|
|
19503
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
19501
19504
|
} = (0, import_react_hook_form13.useForm)({
|
|
19502
19505
|
defaultValues: {
|
|
19503
|
-
|
|
19506
|
+
roleId: currentRoleId
|
|
19504
19507
|
},
|
|
19505
19508
|
resolver: (0, import_zod18.zodResolver)(formSchema2)
|
|
19506
19509
|
});
|
|
19507
|
-
const { mutateAsync:
|
|
19508
|
-
import_frontier43.FrontierServiceQueries.
|
|
19509
|
-
);
|
|
19510
|
-
const { mutateAsync: createPolicy } = (0, import_connect_query39.useMutation)(
|
|
19511
|
-
import_frontier43.FrontierServiceQueries.createPolicy
|
|
19512
|
-
);
|
|
19513
|
-
const roleIds = watch("roleIds");
|
|
19514
|
-
function onCheckedChange(value, roleId) {
|
|
19515
|
-
if (!roleId)
|
|
19516
|
-
return;
|
|
19517
|
-
const currentRoles = new Set(roleIds);
|
|
19518
|
-
if (value) {
|
|
19519
|
-
currentRoles.add(roleId);
|
|
19520
|
-
} else {
|
|
19521
|
-
currentRoles.delete(roleId);
|
|
19522
|
-
}
|
|
19523
|
-
setValue("roleIds", currentRoles);
|
|
19524
|
-
}
|
|
19525
|
-
const checkRole = (0, import_react56.useCallback)(
|
|
19526
|
-
(roleId) => {
|
|
19527
|
-
if (!roleId)
|
|
19528
|
-
return false;
|
|
19529
|
-
return roleIds?.has(roleId) || false;
|
|
19530
|
-
},
|
|
19531
|
-
[roleIds]
|
|
19510
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query39.useMutation)(
|
|
19511
|
+
import_frontier43.FrontierServiceQueries.setProjectMemberRole
|
|
19532
19512
|
);
|
|
19513
|
+
const selectedRoleId = watch("roleId");
|
|
19533
19514
|
const onSubmit = async (data) => {
|
|
19534
19515
|
try {
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
(0, import_protobuf26.create)(import_frontier43.ListPoliciesRequestSchema, {
|
|
19516
|
+
await setProjectMemberRole(
|
|
19517
|
+
(0, import_protobuf26.create)(import_frontier43.SetProjectMemberRoleRequestSchema, {
|
|
19538
19518
|
projectId,
|
|
19539
|
-
|
|
19519
|
+
principalId: user?.id || "",
|
|
19520
|
+
principalType: SCOPES.USER,
|
|
19521
|
+
roleId: data.roleId
|
|
19540
19522
|
})
|
|
19541
19523
|
);
|
|
19542
|
-
const policies = policiesResp.policies || [];
|
|
19543
|
-
const removedRolesPolicies = policies.filter(
|
|
19544
|
-
(policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
|
|
19545
|
-
);
|
|
19546
|
-
await Promise.all(
|
|
19547
|
-
removedRolesPolicies.map(
|
|
19548
|
-
(policy) => deletePolicy(
|
|
19549
|
-
(0, import_protobuf26.create)(import_frontier43.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
19550
|
-
)
|
|
19551
|
-
)
|
|
19552
|
-
);
|
|
19553
|
-
const resource = `app/project:${projectId}`;
|
|
19554
|
-
const principal = `app/user:${user?.id}`;
|
|
19555
|
-
const assignedRolesArr = Array.from(data.roleIds);
|
|
19556
|
-
await Promise.all(
|
|
19557
|
-
assignedRolesArr.map(
|
|
19558
|
-
(roleId) => createPolicy(
|
|
19559
|
-
(0, import_protobuf26.create)(import_frontier43.CreatePolicyRequestSchema, {
|
|
19560
|
-
body: {
|
|
19561
|
-
roleId,
|
|
19562
|
-
resource,
|
|
19563
|
-
principal
|
|
19564
|
-
}
|
|
19565
|
-
})
|
|
19566
|
-
)
|
|
19567
|
-
)
|
|
19568
|
-
);
|
|
19569
19524
|
if (onRoleUpdate) {
|
|
19570
19525
|
onRoleUpdate({
|
|
19571
19526
|
...user,
|
|
19572
|
-
roleIds:
|
|
19527
|
+
roleIds: [data.roleId]
|
|
19573
19528
|
});
|
|
19574
19529
|
}
|
|
19575
19530
|
import_apsara92.toast.success("Role assigned successfully");
|
|
@@ -19595,7 +19550,7 @@ var AssignRole2 = ({
|
|
|
19595
19550
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Flex, { direction: "column", gap: 4, children: [
|
|
19596
19551
|
roles.map((role) => {
|
|
19597
19552
|
const htmlId = `role-${role.id}`;
|
|
19598
|
-
const checked =
|
|
19553
|
+
const checked = selectedRoleId === role.id;
|
|
19599
19554
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Flex, { gap: 3, children: [
|
|
19600
19555
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
19601
19556
|
import_apsara92.Checkbox,
|
|
@@ -19603,13 +19558,15 @@ var AssignRole2 = ({
|
|
|
19603
19558
|
id: htmlId,
|
|
19604
19559
|
"data-test-id": `role-checkbox-${role.id}`,
|
|
19605
19560
|
checked,
|
|
19606
|
-
onCheckedChange: (
|
|
19561
|
+
onCheckedChange: () => setValue("roleId", role.id || "", {
|
|
19562
|
+
shouldDirty: true
|
|
19563
|
+
})
|
|
19607
19564
|
}
|
|
19608
19565
|
),
|
|
19609
19566
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_apsara92.Label, { htmlFor: htmlId, children: role.title })
|
|
19610
19567
|
] }, role.id);
|
|
19611
19568
|
}),
|
|
19612
|
-
errors.
|
|
19569
|
+
errors.roleId && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_apsara92.Text, { variant: "danger", children: errors.roleId.message })
|
|
19613
19570
|
] }) })
|
|
19614
19571
|
] }) }),
|
|
19615
19572
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Dialog.Footer, { children: [
|
|
@@ -19627,6 +19584,7 @@ var AssignRole2 = ({
|
|
|
19627
19584
|
import_apsara92.Button,
|
|
19628
19585
|
{
|
|
19629
19586
|
type: "submit",
|
|
19587
|
+
disabled: !isDirty2,
|
|
19630
19588
|
"data-test-id": "assign-role-update-button",
|
|
19631
19589
|
loading: isSubmitting,
|
|
19632
19590
|
loaderText: "Updating...",
|
|
@@ -19641,93 +19599,91 @@ var AssignRole2 = ({
|
|
|
19641
19599
|
};
|
|
19642
19600
|
|
|
19643
19601
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19644
|
-
var
|
|
19602
|
+
var import_react55 = require("react");
|
|
19645
19603
|
var import_frontier44 = require("@raystack/proton/frontier");
|
|
19646
19604
|
var import_protobuf27 = require("@bufbuild/protobuf");
|
|
19647
19605
|
var import_connect_query40 = require("@connectrpc/connect-query");
|
|
19648
|
-
var import_connect4 = require("@connectrpc/connect");
|
|
19649
19606
|
|
|
19650
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19651
|
-
var digest66 = "
|
|
19652
|
-
var css66 = `.
|
|
19607
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-T2w0SlTwQ0Ht/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19608
|
+
var digest66 = "cf9313b0a537c5f388638d64f2de6e29f78a27e1279c8a94e4a04dc3f84c2857";
|
|
19609
|
+
var css66 = `._flex1_1k2kc_1 {
|
|
19653
19610
|
flex: 1;
|
|
19654
19611
|
}
|
|
19655
19612
|
|
|
19656
|
-
._dialog-
|
|
19613
|
+
._dialog-content_1k2kc_5 {
|
|
19657
19614
|
height: 70vh;
|
|
19658
19615
|
width: 80vw;
|
|
19659
19616
|
}
|
|
19660
19617
|
|
|
19661
|
-
._dialog-
|
|
19618
|
+
._dialog-body_1k2kc_10 {
|
|
19662
19619
|
height: 100%;
|
|
19663
19620
|
}
|
|
19664
19621
|
|
|
19665
|
-
._empty-
|
|
19622
|
+
._empty-state_1k2kc_14 {
|
|
19666
19623
|
height: 100%;
|
|
19667
19624
|
}
|
|
19668
19625
|
|
|
19669
|
-
._empty-state-
|
|
19626
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19670
19627
|
max-width: 360px;
|
|
19671
19628
|
text-wrap: auto;
|
|
19672
19629
|
}
|
|
19673
19630
|
|
|
19674
|
-
.
|
|
19631
|
+
._table_1k2kc_23 {
|
|
19675
19632
|
width: 100%;
|
|
19676
|
-
height: 100%;
|
|
19677
19633
|
table-layout: fixed;
|
|
19678
19634
|
}
|
|
19679
19635
|
|
|
19680
|
-
._table-
|
|
19636
|
+
._table-wrapper_1k2kc_28 {
|
|
19681
19637
|
/* Toolbar height */
|
|
19682
19638
|
max-height: calc(100% - 90px);
|
|
19683
19639
|
overflow: scroll;
|
|
19684
19640
|
}
|
|
19685
19641
|
|
|
19686
|
-
._table-
|
|
19642
|
+
._table-header_1k2kc_34 {
|
|
19687
19643
|
/* position: relative; */
|
|
19688
19644
|
z-index: 2;
|
|
19689
19645
|
}
|
|
19690
19646
|
|
|
19691
|
-
._table-
|
|
19647
|
+
._table-search_1k2kc_39 {
|
|
19692
19648
|
max-width: 360px;
|
|
19693
19649
|
}
|
|
19694
19650
|
|
|
19695
|
-
._table-content-
|
|
19651
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19696
19652
|
height: 100%;
|
|
19697
19653
|
}
|
|
19698
19654
|
|
|
19699
|
-
._table-action-
|
|
19655
|
+
._table-action-column_1k2kc_47 {
|
|
19700
19656
|
width: 24px;
|
|
19701
19657
|
}
|
|
19702
19658
|
|
|
19703
|
-
._table-action-
|
|
19659
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19704
19660
|
z-index: 10000;
|
|
19705
19661
|
min-width: 150px;
|
|
19706
19662
|
}
|
|
19707
19663
|
|
|
19708
|
-
._action-dialog-
|
|
19664
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19709
19665
|
z-index: 10001;
|
|
19710
19666
|
}
|
|
19711
19667
|
|
|
19712
|
-
._action-dialog-
|
|
19668
|
+
._action-dialog-content_1k2kc_60 {
|
|
19713
19669
|
z-index: 10002;
|
|
19714
19670
|
}
|
|
19715
19671
|
|
|
19716
|
-
._add-member-
|
|
19672
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19717
19673
|
width: 240px;
|
|
19718
19674
|
/* position: relative; */
|
|
19719
19675
|
}
|
|
19720
19676
|
|
|
19721
|
-
._add-member-dropdown-
|
|
19677
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19722
19678
|
width: 100%;
|
|
19723
19679
|
}
|
|
19724
|
-
|
|
19680
|
+
|
|
19681
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19725
19682
|
max-width: 100%;
|
|
19726
19683
|
overflow: hidden;
|
|
19727
19684
|
text-overflow: ellipsis;
|
|
19728
19685
|
white-space: nowrap;
|
|
19729
|
-
}
|
|
19730
|
-
`;
|
|
19686
|
+
}`;
|
|
19731
19687
|
(function() {
|
|
19732
19688
|
if (typeof document === "undefined") {
|
|
19733
19689
|
return;
|
|
@@ -19739,7 +19695,7 @@ var css66 = `._flex1_nxqqi_1 {
|
|
|
19739
19695
|
document.head.appendChild(el);
|
|
19740
19696
|
}
|
|
19741
19697
|
})();
|
|
19742
|
-
var members_module_css_default6 = { "flex1": "
|
|
19698
|
+
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" };
|
|
19743
19699
|
|
|
19744
19700
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19745
19701
|
var import_apsara93 = require("@raystack/apsara");
|
|
@@ -19751,31 +19707,22 @@ var RemoveMember2 = ({
|
|
|
19751
19707
|
onClose
|
|
19752
19708
|
}) => {
|
|
19753
19709
|
const t = useTerminology();
|
|
19754
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
19755
|
-
const
|
|
19756
|
-
|
|
19757
|
-
import_frontier44.FrontierServiceQueries.deletePolicy
|
|
19710
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react55.useState)(false);
|
|
19711
|
+
const { mutateAsync: removeProjectMember } = (0, import_connect_query40.useMutation)(
|
|
19712
|
+
import_frontier44.FrontierServiceQueries.removeProjectMember
|
|
19758
19713
|
);
|
|
19759
19714
|
async function onSubmit() {
|
|
19760
19715
|
try {
|
|
19761
19716
|
if (!user)
|
|
19762
19717
|
return;
|
|
19763
19718
|
setIsSubmitting(true);
|
|
19764
|
-
|
|
19765
|
-
|
|
19766
|
-
(0, import_protobuf27.create)(import_frontier44.ListPoliciesRequestSchema, {
|
|
19719
|
+
await removeProjectMember(
|
|
19720
|
+
(0, import_protobuf27.create)(import_frontier44.RemoveProjectMemberRequestSchema, {
|
|
19767
19721
|
projectId,
|
|
19768
|
-
|
|
19722
|
+
principalId: user.id,
|
|
19723
|
+
principalType: "app/user"
|
|
19769
19724
|
})
|
|
19770
19725
|
);
|
|
19771
|
-
const policies = policiesResp.policies || [];
|
|
19772
|
-
await Promise.all(
|
|
19773
|
-
policies.map(
|
|
19774
|
-
(policy) => deletePolicy(
|
|
19775
|
-
(0, import_protobuf27.create)(import_frontier44.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
19776
|
-
)
|
|
19777
|
-
)
|
|
19778
|
-
);
|
|
19779
19726
|
if (onRemove) {
|
|
19780
19727
|
onRemove(user);
|
|
19781
19728
|
}
|
|
@@ -19849,87 +19796,86 @@ var RemoveMember2 = ({
|
|
|
19849
19796
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
19850
19797
|
var import_apsara94 = require("@raystack/apsara");
|
|
19851
19798
|
|
|
19852
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19853
|
-
var digest67 = "
|
|
19854
|
-
var css67 = `.
|
|
19799
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-ubbBgVLE20pF/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19800
|
+
var digest67 = "df22bda685702efd237fb069af7823f74fcf795da8201b1d55c32c7fb50b2a18";
|
|
19801
|
+
var css67 = `._flex1_1k2kc_1 {
|
|
19855
19802
|
flex: 1;
|
|
19856
19803
|
}
|
|
19857
19804
|
|
|
19858
|
-
._dialog-
|
|
19805
|
+
._dialog-content_1k2kc_5 {
|
|
19859
19806
|
height: 70vh;
|
|
19860
19807
|
width: 80vw;
|
|
19861
19808
|
}
|
|
19862
19809
|
|
|
19863
|
-
._dialog-
|
|
19810
|
+
._dialog-body_1k2kc_10 {
|
|
19864
19811
|
height: 100%;
|
|
19865
19812
|
}
|
|
19866
19813
|
|
|
19867
|
-
._empty-
|
|
19814
|
+
._empty-state_1k2kc_14 {
|
|
19868
19815
|
height: 100%;
|
|
19869
19816
|
}
|
|
19870
19817
|
|
|
19871
|
-
._empty-state-
|
|
19818
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19872
19819
|
max-width: 360px;
|
|
19873
19820
|
text-wrap: auto;
|
|
19874
19821
|
}
|
|
19875
19822
|
|
|
19876
|
-
.
|
|
19823
|
+
._table_1k2kc_23 {
|
|
19877
19824
|
width: 100%;
|
|
19878
|
-
height: 100%;
|
|
19879
19825
|
table-layout: fixed;
|
|
19880
19826
|
}
|
|
19881
19827
|
|
|
19882
|
-
._table-
|
|
19828
|
+
._table-wrapper_1k2kc_28 {
|
|
19883
19829
|
/* Toolbar height */
|
|
19884
19830
|
max-height: calc(100% - 90px);
|
|
19885
19831
|
overflow: scroll;
|
|
19886
19832
|
}
|
|
19887
19833
|
|
|
19888
|
-
._table-
|
|
19834
|
+
._table-header_1k2kc_34 {
|
|
19889
19835
|
/* position: relative; */
|
|
19890
19836
|
z-index: 2;
|
|
19891
19837
|
}
|
|
19892
19838
|
|
|
19893
|
-
._table-
|
|
19839
|
+
._table-search_1k2kc_39 {
|
|
19894
19840
|
max-width: 360px;
|
|
19895
19841
|
}
|
|
19896
19842
|
|
|
19897
|
-
._table-content-
|
|
19843
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19898
19844
|
height: 100%;
|
|
19899
19845
|
}
|
|
19900
19846
|
|
|
19901
|
-
._table-action-
|
|
19847
|
+
._table-action-column_1k2kc_47 {
|
|
19902
19848
|
width: 24px;
|
|
19903
19849
|
}
|
|
19904
19850
|
|
|
19905
|
-
._table-action-
|
|
19851
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19906
19852
|
z-index: 10000;
|
|
19907
19853
|
min-width: 150px;
|
|
19908
19854
|
}
|
|
19909
19855
|
|
|
19910
|
-
._action-dialog-
|
|
19856
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19911
19857
|
z-index: 10001;
|
|
19912
19858
|
}
|
|
19913
19859
|
|
|
19914
|
-
._action-dialog-
|
|
19860
|
+
._action-dialog-content_1k2kc_60 {
|
|
19915
19861
|
z-index: 10002;
|
|
19916
19862
|
}
|
|
19917
19863
|
|
|
19918
|
-
._add-member-
|
|
19864
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19919
19865
|
width: 240px;
|
|
19920
19866
|
/* position: relative; */
|
|
19921
19867
|
}
|
|
19922
19868
|
|
|
19923
|
-
._add-member-dropdown-
|
|
19869
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19924
19870
|
width: 100%;
|
|
19925
19871
|
}
|
|
19926
|
-
|
|
19872
|
+
|
|
19873
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19927
19874
|
max-width: 100%;
|
|
19928
19875
|
overflow: hidden;
|
|
19929
19876
|
text-overflow: ellipsis;
|
|
19930
19877
|
white-space: nowrap;
|
|
19931
|
-
}
|
|
19932
|
-
`;
|
|
19878
|
+
}`;
|
|
19933
19879
|
(function() {
|
|
19934
19880
|
if (typeof document === "undefined") {
|
|
19935
19881
|
return;
|
|
@@ -19941,7 +19887,7 @@ var css67 = `._flex1_nxqqi_1 {
|
|
|
19941
19887
|
document.head.appendChild(el);
|
|
19942
19888
|
}
|
|
19943
19889
|
})();
|
|
19944
|
-
var members_module_css_default7 = { "flex1": "
|
|
19890
|
+
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" };
|
|
19945
19891
|
|
|
19946
19892
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
19947
19893
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
@@ -20033,8 +19979,8 @@ var ProjectMembersDialog = ({
|
|
|
20033
19979
|
},
|
|
20034
19980
|
200
|
|
20035
19981
|
);
|
|
20036
|
-
const [assignRoleConfig, setAssignRoleConfig] = (0,
|
|
20037
|
-
const [removeMemberConfig, setRemoveMemberConfig] = (0,
|
|
19982
|
+
const [assignRoleConfig, setAssignRoleConfig] = (0, import_react56.useState)({ isOpen: false, user: null });
|
|
19983
|
+
const [removeMemberConfig, setRemoveMemberConfig] = (0, import_react56.useState)({ isOpen: false, user: null });
|
|
20038
19984
|
const { data: project, isLoading: isProjectLoading, error: projectError } = (0, import_connect_query41.useQuery)(
|
|
20039
19985
|
import_frontier45.FrontierServiceQueries.getProject,
|
|
20040
19986
|
(0, import_protobuf28.create)(import_frontier45.GetProjectRequestSchema, { id: projectId }),
|
|
@@ -20080,7 +20026,7 @@ var ProjectMembersDialog = ({
|
|
|
20080
20026
|
}
|
|
20081
20027
|
);
|
|
20082
20028
|
const data = infiniteData?.pages?.flatMap((page) => page?.projectUsers || []) || [];
|
|
20083
|
-
const onTableQueryChange = (0,
|
|
20029
|
+
const onTableQueryChange = (0, import_react56.useCallback)((query) => {
|
|
20084
20030
|
const updatedQuery = {
|
|
20085
20031
|
...query,
|
|
20086
20032
|
offset: 0,
|
|
@@ -20097,7 +20043,7 @@ var ProjectMembersDialog = ({
|
|
|
20097
20043
|
rqlRequest: updatedRQLRequest
|
|
20098
20044
|
});
|
|
20099
20045
|
}, []);
|
|
20100
|
-
const handleLoadMore = (0,
|
|
20046
|
+
const handleLoadMore = (0, import_react56.useCallback)(async () => {
|
|
20101
20047
|
try {
|
|
20102
20048
|
if (!hasNextPage)
|
|
20103
20049
|
return;
|
|
@@ -20109,25 +20055,25 @@ var ProjectMembersDialog = ({
|
|
|
20109
20055
|
async function refetchMembers() {
|
|
20110
20056
|
await refetch();
|
|
20111
20057
|
}
|
|
20112
|
-
const openAssignRoleDialog = (0,
|
|
20058
|
+
const openAssignRoleDialog = (0, import_react56.useCallback)(
|
|
20113
20059
|
(user) => {
|
|
20114
20060
|
setAssignRoleConfig({ isOpen: true, user });
|
|
20115
20061
|
},
|
|
20116
20062
|
[]
|
|
20117
20063
|
);
|
|
20118
|
-
const closeAssignRoleDialog = (0,
|
|
20064
|
+
const closeAssignRoleDialog = (0, import_react56.useCallback)(() => {
|
|
20119
20065
|
setAssignRoleConfig({ isOpen: false, user: null });
|
|
20120
20066
|
}, []);
|
|
20121
|
-
const openRemoveMemberDialog = (0,
|
|
20067
|
+
const openRemoveMemberDialog = (0, import_react56.useCallback)(
|
|
20122
20068
|
(user) => {
|
|
20123
20069
|
setRemoveMemberConfig({ isOpen: true, user });
|
|
20124
20070
|
},
|
|
20125
20071
|
[]
|
|
20126
20072
|
);
|
|
20127
|
-
const closeRemoveMemberDialog = (0,
|
|
20073
|
+
const closeRemoveMemberDialog = (0, import_react56.useCallback)(() => {
|
|
20128
20074
|
setRemoveMemberConfig({ isOpen: false, user: null });
|
|
20129
20075
|
}, []);
|
|
20130
|
-
const columns = (0,
|
|
20076
|
+
const columns = (0, import_react56.useMemo)(
|
|
20131
20077
|
() => getColumns14({
|
|
20132
20078
|
roles: projectRoles,
|
|
20133
20079
|
handleAssignRoleAction: openAssignRoleDialog,
|
|
@@ -20264,20 +20210,20 @@ var ErrorState2 = () => {
|
|
|
20264
20210
|
};
|
|
20265
20211
|
function OrganizationProjectsView() {
|
|
20266
20212
|
const t = useTerminology();
|
|
20267
|
-
const { organization, search, orgMembersMap, isOrgMembersMapLoading } = (0,
|
|
20213
|
+
const { organization, search, orgMembersMap, isOrgMembersMapLoading } = (0, import_react57.useContext)(OrganizationContext);
|
|
20268
20214
|
const {
|
|
20269
20215
|
onChange: onSearchChange,
|
|
20270
20216
|
setVisibility: setSearchVisibility,
|
|
20271
20217
|
query: searchQuery
|
|
20272
20218
|
} = search;
|
|
20273
20219
|
const organizationId = organization?.id || "";
|
|
20274
|
-
const [memberDialogConfig, setMemberDialogConfig] = (0,
|
|
20220
|
+
const [memberDialogConfig, setMemberDialogConfig] = (0, import_react57.useState)({
|
|
20275
20221
|
open: false,
|
|
20276
20222
|
projectId: ""
|
|
20277
20223
|
});
|
|
20278
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20224
|
+
const [tableQuery, setTableQuery] = (0, import_react57.useState)(INITIAL_QUERY7);
|
|
20279
20225
|
const title = `${t.project({ plural: true, case: "capital" })} | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20280
|
-
const computedQuery = (0,
|
|
20226
|
+
const computedQuery = (0, import_react57.useMemo)(() => {
|
|
20281
20227
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS3);
|
|
20282
20228
|
return {
|
|
20283
20229
|
...tempQuery,
|
|
@@ -20319,7 +20265,7 @@ function OrganizationProjectsView() {
|
|
|
20319
20265
|
function handleProjectUpdate(project) {
|
|
20320
20266
|
refetchOrgProjects();
|
|
20321
20267
|
}
|
|
20322
|
-
(0,
|
|
20268
|
+
(0, import_react57.useEffect)(() => {
|
|
20323
20269
|
setSearchVisibility(true);
|
|
20324
20270
|
return () => {
|
|
20325
20271
|
onSearchChange("");
|
|
@@ -20385,8 +20331,8 @@ function OrganizationProjectsView() {
|
|
|
20385
20331
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20386
20332
|
var import_apsara98 = require("@raystack/apsara");
|
|
20387
20333
|
|
|
20388
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20389
|
-
var digest68 = "
|
|
20334
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-dS1ReF1k3rri/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
20335
|
+
var digest68 = "975719524e1917500ce09273626b84d2f0e3423fb08fba64ff337b015c534170";
|
|
20390
20336
|
var css68 = `._empty-state_ct7gw_1 {
|
|
20391
20337
|
height: 100%;
|
|
20392
20338
|
}
|
|
@@ -20430,10 +20376,10 @@ var css68 = `._empty-state_ct7gw_1 {
|
|
|
20430
20376
|
var invoices_module_css_default3 = { "empty-state": "_empty-state_ct7gw_1", "emptyState": "_empty-state_ct7gw_1", "empty-state-subheading": "_empty-state-subheading_ct7gw_5", "emptyStateSubheading": "_empty-state-subheading_ct7gw_5", "table": "_table_ct7gw_10", "table-wrapper": "_table-wrapper_ct7gw_15", "tableWrapper": "_table-wrapper_ct7gw_15", "table-header": "_table-header_ct7gw_21", "tableHeader": "_table-header_ct7gw_21", "first-column": "_first-column_ct7gw_26", "firstColumn": "_first-column_ct7gw_26" };
|
|
20431
20377
|
|
|
20432
20378
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20433
|
-
var
|
|
20379
|
+
var import_react58 = require("react");
|
|
20434
20380
|
|
|
20435
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20436
|
-
var digest69 = "
|
|
20381
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-f2JnUfwIUvw4/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
20382
|
+
var digest69 = "5058e58e35e5a19acab5811963ea066a27f25890d6bf1ddb7eb4e61071c48cde";
|
|
20437
20383
|
var css69 = `._empty-state_ct7gw_1 {
|
|
20438
20384
|
height: 100%;
|
|
20439
20385
|
}
|
|
@@ -20599,16 +20545,16 @@ var ErrorState3 = () => {
|
|
|
20599
20545
|
};
|
|
20600
20546
|
function OrganizationInvoicesView() {
|
|
20601
20547
|
const t = useTerminology();
|
|
20602
|
-
const { organization, search } = (0,
|
|
20548
|
+
const { organization, search } = (0, import_react58.useContext)(OrganizationContext);
|
|
20603
20549
|
const organizationId = organization?.id || "";
|
|
20604
20550
|
const {
|
|
20605
20551
|
onChange: onSearchChange,
|
|
20606
20552
|
setVisibility: setSearchVisibility,
|
|
20607
20553
|
query: searchQuery
|
|
20608
20554
|
} = search;
|
|
20609
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20555
|
+
const [tableQuery, setTableQuery] = (0, import_react58.useState)(INITIAL_QUERY8);
|
|
20610
20556
|
const title = `Invoices | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20611
|
-
const computedQuery = (0,
|
|
20557
|
+
const computedQuery = (0, import_react58.useMemo)(() => {
|
|
20612
20558
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS4);
|
|
20613
20559
|
return {
|
|
20614
20560
|
...tempQuery,
|
|
@@ -20651,7 +20597,7 @@ function OrganizationInvoicesView() {
|
|
|
20651
20597
|
await fetchNextPage();
|
|
20652
20598
|
}
|
|
20653
20599
|
};
|
|
20654
|
-
(0,
|
|
20600
|
+
(0, import_react58.useEffect)(() => {
|
|
20655
20601
|
setSearchVisibility(true);
|
|
20656
20602
|
return () => {
|
|
20657
20603
|
onSearchChange("");
|
|
@@ -20694,8 +20640,8 @@ function OrganizationInvoicesView() {
|
|
|
20694
20640
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20695
20641
|
var import_apsara100 = require("@raystack/apsara");
|
|
20696
20642
|
|
|
20697
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20698
|
-
var digest70 = "
|
|
20643
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-ERwKybUk1B8U/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
20644
|
+
var digest70 = "e3c58e280795021a32e8cd561e51398e21b091b594d089bbc3667bcf686307db";
|
|
20699
20645
|
var css70 = `._empty-state_1mf09_1 {
|
|
20700
20646
|
height: 100%;
|
|
20701
20647
|
}
|
|
@@ -20751,12 +20697,12 @@ var tokens_module_css_default = { "empty-state": "_empty-state_1mf09_1", "emptyS
|
|
|
20751
20697
|
|
|
20752
20698
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20753
20699
|
var import_icons7 = require("@raystack/apsara/icons");
|
|
20754
|
-
var
|
|
20700
|
+
var import_react59 = require("react");
|
|
20755
20701
|
var import_frontier48 = require("@raystack/proton/frontier");
|
|
20756
20702
|
var import_connect_query44 = require("@connectrpc/connect-query");
|
|
20757
20703
|
|
|
20758
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20759
|
-
var digest71 = "
|
|
20704
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-LFfctKpheW0p/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
20705
|
+
var digest71 = "17b9e64c6416574b44667e8bc238b2d18472ca4808e6d21c5f148ee385eb7916";
|
|
20760
20706
|
var css71 = `._empty-state_1mf09_1 {
|
|
20761
20707
|
height: 100%;
|
|
20762
20708
|
}
|
|
@@ -20931,16 +20877,16 @@ var ErrorState4 = () => {
|
|
|
20931
20877
|
};
|
|
20932
20878
|
function OrganizationTokensView() {
|
|
20933
20879
|
const t = useTerminology();
|
|
20934
|
-
const { organization, search } = (0,
|
|
20880
|
+
const { organization, search } = (0, import_react59.useContext)(OrganizationContext);
|
|
20935
20881
|
const organizationId = organization?.id || "";
|
|
20936
20882
|
const {
|
|
20937
20883
|
onChange: onSearchChange,
|
|
20938
20884
|
setVisibility: setSearchVisibility,
|
|
20939
20885
|
query: searchQuery
|
|
20940
20886
|
} = search;
|
|
20941
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20887
|
+
const [tableQuery, setTableQuery] = (0, import_react59.useState)(INITIAL_QUERY9);
|
|
20942
20888
|
const title = `Tokens | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20943
|
-
const computedQuery = (0,
|
|
20889
|
+
const computedQuery = (0, import_react59.useMemo)(() => {
|
|
20944
20890
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS5);
|
|
20945
20891
|
return {
|
|
20946
20892
|
...tempQuery,
|
|
@@ -20982,14 +20928,14 @@ function OrganizationTokensView() {
|
|
|
20982
20928
|
await fetchNextPage();
|
|
20983
20929
|
}
|
|
20984
20930
|
};
|
|
20985
|
-
(0,
|
|
20931
|
+
(0, import_react59.useEffect)(() => {
|
|
20986
20932
|
setSearchVisibility(true);
|
|
20987
20933
|
return () => {
|
|
20988
20934
|
onSearchChange("");
|
|
20989
20935
|
setSearchVisibility(false);
|
|
20990
20936
|
};
|
|
20991
20937
|
}, [setSearchVisibility, onSearchChange]);
|
|
20992
|
-
const columns = (0,
|
|
20938
|
+
const columns = (0, import_react59.useMemo)(() => getColumns16({ t }), [t]);
|
|
20993
20939
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_apsara100.Flex, { justify: "center", children: [
|
|
20994
20940
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(PageTitle, { title }),
|
|
20995
20941
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
@@ -21025,8 +20971,8 @@ function OrganizationTokensView() {
|
|
|
21025
20971
|
// admin/views/organizations/details/apis/index.tsx
|
|
21026
20972
|
var import_apsara103 = require("@raystack/apsara");
|
|
21027
20973
|
|
|
21028
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21029
|
-
var digest72 = "
|
|
20974
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-P8hOHu0hN3xn/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
20975
|
+
var digest72 = "c71ad3c96e420e02c3dd084ee285d94e46a132934bef97f5d0c8e70dea588ef7";
|
|
21030
20976
|
var css72 = `._empty-state_r9k2f_1 {
|
|
21031
20977
|
height: 100%;
|
|
21032
20978
|
}
|
|
@@ -21105,14 +21051,14 @@ var css72 = `._empty-state_r9k2f_1 {
|
|
|
21105
21051
|
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" };
|
|
21106
21052
|
|
|
21107
21053
|
// admin/views/organizations/details/apis/index.tsx
|
|
21108
|
-
var
|
|
21054
|
+
var import_react61 = require("react");
|
|
21109
21055
|
|
|
21110
21056
|
// admin/views/organizations/details/apis/columns.tsx
|
|
21111
21057
|
var import_apsara101 = require("@raystack/apsara");
|
|
21112
21058
|
var import_dayjs16 = __toESM(require("dayjs"));
|
|
21113
21059
|
|
|
21114
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21115
|
-
var digest73 = "
|
|
21060
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-yvz9LFIHzVvU/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21061
|
+
var digest73 = "de35243fee3ddb994ca7ffa995f32f12aca3d008e483fae8728ef9360be44044";
|
|
21116
21062
|
var css73 = `._empty-state_r9k2f_1 {
|
|
21117
21063
|
height: 100%;
|
|
21118
21064
|
}
|
|
@@ -21236,8 +21182,8 @@ function getColumns17(options) {
|
|
|
21236
21182
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21237
21183
|
var import_apsara102 = require("@raystack/apsara");
|
|
21238
21184
|
|
|
21239
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21240
|
-
var digest74 = "
|
|
21185
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-n1oY2RU5tKvO/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21186
|
+
var digest74 = "e55abd98419b3b3af632cc685493589eacc147cb9606526062d2f5f240eb2860";
|
|
21241
21187
|
var css74 = `._empty-state_r9k2f_1 {
|
|
21242
21188
|
height: 100%;
|
|
21243
21189
|
}
|
|
@@ -21316,7 +21262,7 @@ var css74 = `._empty-state_r9k2f_1 {
|
|
|
21316
21262
|
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" };
|
|
21317
21263
|
|
|
21318
21264
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21319
|
-
var
|
|
21265
|
+
var import_react60 = require("react");
|
|
21320
21266
|
var import_connect_query45 = require("@connectrpc/connect-query");
|
|
21321
21267
|
var import_frontier49 = require("@raystack/proton/frontier");
|
|
21322
21268
|
var import_protobuf29 = require("@bufbuild/protobuf");
|
|
@@ -21327,14 +21273,14 @@ var ServiceUserDetailsDialog = ({
|
|
|
21327
21273
|
}) => {
|
|
21328
21274
|
const t = useTerminology();
|
|
21329
21275
|
const { id = "", orgId = "", title = "" } = serviceUser || {};
|
|
21330
|
-
const projectsRequest = (0,
|
|
21276
|
+
const projectsRequest = (0, import_react60.useMemo)(
|
|
21331
21277
|
() => (0, import_protobuf29.create)(import_frontier49.ListServiceUserProjectsRequestSchema, {
|
|
21332
21278
|
orgId,
|
|
21333
21279
|
id
|
|
21334
21280
|
}),
|
|
21335
21281
|
[orgId, id]
|
|
21336
21282
|
);
|
|
21337
|
-
const tokensRequest = (0,
|
|
21283
|
+
const tokensRequest = (0, import_react60.useMemo)(
|
|
21338
21284
|
() => (0, import_protobuf29.create)(import_frontier49.ListServiceUserTokensRequestSchema, {
|
|
21339
21285
|
orgId,
|
|
21340
21286
|
id
|
|
@@ -21357,7 +21303,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21357
21303
|
enabled: !!orgId && !!id,
|
|
21358
21304
|
select: (data) => data?.tokens || []
|
|
21359
21305
|
});
|
|
21360
|
-
(0,
|
|
21306
|
+
(0, import_react60.useEffect)(() => {
|
|
21361
21307
|
if (projectError) {
|
|
21362
21308
|
import_apsara102.toast.error("Something went wrong", {
|
|
21363
21309
|
description: "Unable to fetch projects"
|
|
@@ -21371,7 +21317,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21371
21317
|
console.error("Unable to fetch tokens:", tokenError);
|
|
21372
21318
|
}
|
|
21373
21319
|
}, [projectError, tokenError]);
|
|
21374
|
-
const onOpenChange = (0,
|
|
21320
|
+
const onOpenChange = (0, import_react60.useCallback)(
|
|
21375
21321
|
(val) => {
|
|
21376
21322
|
if (!val) {
|
|
21377
21323
|
onClose();
|
|
@@ -21482,15 +21428,15 @@ var TRANSFORM_OPTIONS6 = {
|
|
|
21482
21428
|
};
|
|
21483
21429
|
function OrganizationApisView() {
|
|
21484
21430
|
const t = useTerminology();
|
|
21485
|
-
const { organization, search } = (0,
|
|
21431
|
+
const { organization, search } = (0, import_react61.useContext)(OrganizationContext);
|
|
21486
21432
|
const organizationId = organization?.id || "";
|
|
21487
21433
|
const {
|
|
21488
21434
|
onChange: onSearchChange,
|
|
21489
21435
|
setVisibility: setSearchVisibility,
|
|
21490
21436
|
query: searchQuery
|
|
21491
21437
|
} = search;
|
|
21492
|
-
const [tableQuery, setTableQuery] = (0,
|
|
21493
|
-
const computedQuery = (0,
|
|
21438
|
+
const [tableQuery, setTableQuery] = (0, import_react61.useState)(INITIAL_QUERY10);
|
|
21439
|
+
const computedQuery = (0, import_react61.useMemo)(() => {
|
|
21494
21440
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS6);
|
|
21495
21441
|
return {
|
|
21496
21442
|
...tempQuery,
|
|
@@ -21498,11 +21444,11 @@ function OrganizationApisView() {
|
|
|
21498
21444
|
};
|
|
21499
21445
|
}, [tableQuery, searchQuery]);
|
|
21500
21446
|
const [query] = useDebounceValue(computedQuery, 200);
|
|
21501
|
-
const [selectedServiceUser, setSelectedServiceUser] = (0,
|
|
21447
|
+
const [selectedServiceUser, setSelectedServiceUser] = (0, import_react61.useState)(
|
|
21502
21448
|
null
|
|
21503
21449
|
);
|
|
21504
21450
|
const title = `API | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
21505
|
-
(0,
|
|
21451
|
+
(0, import_react61.useEffect)(() => {
|
|
21506
21452
|
setSearchVisibility(true);
|
|
21507
21453
|
return () => {
|
|
21508
21454
|
onSearchChange("");
|
|
@@ -21548,10 +21494,10 @@ function OrganizationApisView() {
|
|
|
21548
21494
|
}
|
|
21549
21495
|
};
|
|
21550
21496
|
const loading = isLoading || isFetchingNextPage;
|
|
21551
|
-
const onDialogClose = (0,
|
|
21497
|
+
const onDialogClose = (0, import_react61.useCallback)(() => {
|
|
21552
21498
|
setSelectedServiceUser(null);
|
|
21553
21499
|
}, []);
|
|
21554
|
-
const onRowClick = (0,
|
|
21500
|
+
const onRowClick = (0, import_react61.useCallback)(
|
|
21555
21501
|
(row) => {
|
|
21556
21502
|
setSelectedServiceUser(row);
|
|
21557
21503
|
},
|
|
@@ -21560,7 +21506,7 @@ function OrganizationApisView() {
|
|
|
21560
21506
|
if (isError) {
|
|
21561
21507
|
console.error("ConnectRPC Error:", error);
|
|
21562
21508
|
}
|
|
21563
|
-
const columns = (0,
|
|
21509
|
+
const columns = (0, import_react61.useMemo)(
|
|
21564
21510
|
() => getColumns17({
|
|
21565
21511
|
groupCountMap: infiniteData ? getGroupCountMapFromFirstPage(infiniteData) : {},
|
|
21566
21512
|
t
|