@raystack/frontier 0.96.1 → 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 +550 -605
- package/admin/dist/index.mjs +448 -503
- 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 +4 -4
- 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.
|
|
11931
|
-
);
|
|
11932
|
-
const { mutateAsync: createPolicy } = (0, import_connect_query15.useMutation)(
|
|
11933
|
-
import_frontier18.FrontierServiceQueries.createPolicy
|
|
11959
|
+
const { mutateAsync: setMemberRole } = (0, import_connect_query15.useMutation)(
|
|
11960
|
+
import_frontier18.FrontierServiceQueries.setOrganizationMemberRole
|
|
11934
11961
|
);
|
|
11935
|
-
const
|
|
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;
|
|
@@ -17432,16 +17429,15 @@ var OrganizationDetailsView = ({
|
|
|
17432
17429
|
refetch: fetchTokenBalance
|
|
17433
17430
|
} = (0, import_connect_query31.useQuery)(
|
|
17434
17431
|
import_frontier35.FrontierServiceQueries.getBillingBalance,
|
|
17435
|
-
{
|
|
17436
|
-
orgId: organizationId || "",
|
|
17432
|
+
(0, import_protobuf19.create)(import_frontier35.GetBillingBalanceRequestSchema, {
|
|
17437
17433
|
id: firstBillingAccountId
|
|
17438
|
-
},
|
|
17434
|
+
}),
|
|
17439
17435
|
{
|
|
17440
17436
|
enabled: !!organizationId && !!firstBillingAccountId,
|
|
17441
17437
|
select: (data) => String(data?.balance?.amount || "0")
|
|
17442
17438
|
}
|
|
17443
17439
|
);
|
|
17444
|
-
(0,
|
|
17440
|
+
(0, import_react46.useEffect)(() => {
|
|
17445
17441
|
if (organizationError) {
|
|
17446
17442
|
console.error("Failed to fetch organization:", organizationError);
|
|
17447
17443
|
}
|
|
@@ -17530,8 +17526,8 @@ var OrganizationDetailsView = ({
|
|
|
17530
17526
|
// admin/views/organizations/details/security/index.tsx
|
|
17531
17527
|
var import_apsara84 = require("@raystack/apsara");
|
|
17532
17528
|
|
|
17533
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17534
|
-
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";
|
|
17535
17531
|
var css57 = `._container_1wkae_1 {
|
|
17536
17532
|
width: 100%;
|
|
17537
17533
|
}
|
|
@@ -17572,11 +17568,11 @@ var css57 = `._container_1wkae_1 {
|
|
|
17572
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" };
|
|
17573
17569
|
|
|
17574
17570
|
// admin/views/organizations/details/security/index.tsx
|
|
17575
|
-
var
|
|
17571
|
+
var import_react49 = require("react");
|
|
17576
17572
|
|
|
17577
17573
|
// admin/views/organizations/details/security/block-organization.tsx
|
|
17578
17574
|
var import_apsara82 = require("@raystack/apsara");
|
|
17579
|
-
var
|
|
17575
|
+
var import_react47 = require("react");
|
|
17580
17576
|
var import_connect_query32 = require("@connectrpc/connect-query");
|
|
17581
17577
|
var import_frontier36 = require("@raystack/proton/frontier");
|
|
17582
17578
|
var import_protobuf20 = require("@bufbuild/protobuf");
|
|
@@ -17584,10 +17580,10 @@ var import_react_query13 = require("@tanstack/react-query");
|
|
|
17584
17580
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
17585
17581
|
var BlockOrganizationDialog = () => {
|
|
17586
17582
|
const t = useTerminology();
|
|
17587
|
-
const { organization } = (0,
|
|
17583
|
+
const { organization } = (0, import_react47.useContext)(OrganizationContext);
|
|
17588
17584
|
const queryClient = (0, import_react_query13.useQueryClient)();
|
|
17589
17585
|
const transport = (0, import_connect_query32.useTransport)();
|
|
17590
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
17586
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react47.useState)(false);
|
|
17591
17587
|
const { mutateAsync: disableOrganization, isPending: isDisabling } = (0, import_connect_query32.useMutation)(
|
|
17592
17588
|
import_frontier36.FrontierServiceQueries.disableOrganization,
|
|
17593
17589
|
{
|
|
@@ -17724,8 +17720,8 @@ var BlockOrganizationSection = () => {
|
|
|
17724
17720
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17725
17721
|
var import_apsara83 = require("@raystack/apsara");
|
|
17726
17722
|
|
|
17727
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17728
|
-
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";
|
|
17729
17725
|
var css58 = `._container_1wkae_1 {
|
|
17730
17726
|
width: 100%;
|
|
17731
17727
|
}
|
|
@@ -17766,7 +17762,7 @@ var css58 = `._container_1wkae_1 {
|
|
|
17766
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" };
|
|
17767
17763
|
|
|
17768
17764
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17769
|
-
var
|
|
17765
|
+
var import_react48 = require("react");
|
|
17770
17766
|
var import_connect_query33 = require("@connectrpc/connect-query");
|
|
17771
17767
|
var import_react_query14 = require("@tanstack/react-query");
|
|
17772
17768
|
var import_frontier37 = require("@raystack/proton/frontier");
|
|
@@ -17775,8 +17771,8 @@ var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
|
17775
17771
|
var DeleteDomainDialog = ({
|
|
17776
17772
|
domain
|
|
17777
17773
|
}) => {
|
|
17778
|
-
const { organization } = (0,
|
|
17779
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
17774
|
+
const { organization } = (0, import_react48.useContext)(OrganizationContext);
|
|
17775
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react48.useState)(false);
|
|
17780
17776
|
const queryClient = (0, import_react_query14.useQueryClient)();
|
|
17781
17777
|
const transport = (0, import_connect_query33.useTransport)();
|
|
17782
17778
|
const { mutateAsync: deleteDomain, isPending } = (0, import_connect_query33.useMutation)(
|
|
@@ -17883,7 +17879,7 @@ var DomainsList = ({
|
|
|
17883
17879
|
var import_connect_query34 = require("@connectrpc/connect-query");
|
|
17884
17880
|
var import_frontier38 = require("@raystack/proton/frontier");
|
|
17885
17881
|
var import_protobuf22 = require("@bufbuild/protobuf");
|
|
17886
|
-
var
|
|
17882
|
+
var import_react50 = require("react");
|
|
17887
17883
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
17888
17884
|
var AddDomainSection = () => {
|
|
17889
17885
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_apsara84.Flex, { gap: 5, justify: "between", children: [
|
|
@@ -17906,7 +17902,7 @@ var AddDomainSection = () => {
|
|
|
17906
17902
|
] });
|
|
17907
17903
|
};
|
|
17908
17904
|
var OrganizationSecurity = () => {
|
|
17909
|
-
const { organization } = (0,
|
|
17905
|
+
const { organization } = (0, import_react49.useContext)(OrganizationContext);
|
|
17910
17906
|
const { data: domains, isLoading, error } = (0, import_connect_query34.useQuery)(
|
|
17911
17907
|
import_frontier38.FrontierServiceQueries.listOrganizationDomains,
|
|
17912
17908
|
(0, import_protobuf22.create)(import_frontier38.ListOrganizationDomainsRequestSchema, {
|
|
@@ -17917,7 +17913,7 @@ var OrganizationSecurity = () => {
|
|
|
17917
17913
|
select: (data) => data?.domains || []
|
|
17918
17914
|
}
|
|
17919
17915
|
);
|
|
17920
|
-
(0,
|
|
17916
|
+
(0, import_react50.useEffect)(() => {
|
|
17921
17917
|
if (error) {
|
|
17922
17918
|
import_apsara84.toast.error("Something went wrong", {
|
|
17923
17919
|
description: "Unable to fetch domains"
|
|
@@ -17946,8 +17942,8 @@ var OrganizationSecurity = () => {
|
|
|
17946
17942
|
// admin/views/organizations/details/members/index.tsx
|
|
17947
17943
|
var import_apsara87 = require("@raystack/apsara");
|
|
17948
17944
|
|
|
17949
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17950
|
-
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";
|
|
17951
17947
|
var css59 = `._container_6bi1j_1 {
|
|
17952
17948
|
width: 100%;
|
|
17953
17949
|
}
|
|
@@ -17999,13 +17995,13 @@ var css59 = `._container_6bi1j_1 {
|
|
|
17999
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" };
|
|
18000
17996
|
|
|
18001
17997
|
// admin/views/organizations/details/members/index.tsx
|
|
18002
|
-
var
|
|
17998
|
+
var import_react52 = require("react");
|
|
18003
17999
|
|
|
18004
18000
|
// admin/views/organizations/details/members/columns.tsx
|
|
18005
18001
|
var import_apsara85 = require("@raystack/apsara");
|
|
18006
18002
|
|
|
18007
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18008
|
-
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";
|
|
18009
18005
|
var css60 = `._container_6bi1j_1 {
|
|
18010
18006
|
width: 100%;
|
|
18011
18007
|
}
|
|
@@ -18280,12 +18276,12 @@ var RemoveMember = ({
|
|
|
18280
18276
|
};
|
|
18281
18277
|
|
|
18282
18278
|
// ../node_modules/.pnpm/usehooks-ts@3.1.1_react@19.2.4/node_modules/usehooks-ts/dist/index.js
|
|
18283
|
-
var
|
|
18279
|
+
var import_react51 = require("react");
|
|
18284
18280
|
var import_lodash2 = __toESM(require_lodash(), 1);
|
|
18285
18281
|
function useUnmount(func) {
|
|
18286
|
-
const funcRef = (0,
|
|
18282
|
+
const funcRef = (0, import_react51.useRef)(func);
|
|
18287
18283
|
funcRef.current = func;
|
|
18288
|
-
(0,
|
|
18284
|
+
(0, import_react51.useEffect)(
|
|
18289
18285
|
() => () => {
|
|
18290
18286
|
funcRef.current();
|
|
18291
18287
|
},
|
|
@@ -18293,13 +18289,13 @@ function useUnmount(func) {
|
|
|
18293
18289
|
);
|
|
18294
18290
|
}
|
|
18295
18291
|
function useDebounceCallback(func, delay = 500, options) {
|
|
18296
|
-
const debouncedFunc = (0,
|
|
18292
|
+
const debouncedFunc = (0, import_react51.useRef)();
|
|
18297
18293
|
useUnmount(() => {
|
|
18298
18294
|
if (debouncedFunc.current) {
|
|
18299
18295
|
debouncedFunc.current.cancel();
|
|
18300
18296
|
}
|
|
18301
18297
|
});
|
|
18302
|
-
const debounced = (0,
|
|
18298
|
+
const debounced = (0, import_react51.useMemo)(() => {
|
|
18303
18299
|
const debouncedFuncInstance = (0, import_lodash2.default)(func, delay, options);
|
|
18304
18300
|
const wrappedFunc = (...args) => {
|
|
18305
18301
|
return debouncedFuncInstance(...args);
|
|
@@ -18315,7 +18311,7 @@ function useDebounceCallback(func, delay = 500, options) {
|
|
|
18315
18311
|
};
|
|
18316
18312
|
return wrappedFunc;
|
|
18317
18313
|
}, [func, delay, options]);
|
|
18318
|
-
(0,
|
|
18314
|
+
(0, import_react51.useEffect)(() => {
|
|
18319
18315
|
debouncedFunc.current = (0, import_lodash2.default)(func, delay, options);
|
|
18320
18316
|
}, [func, delay, options]);
|
|
18321
18317
|
return debounced;
|
|
@@ -18323,8 +18319,8 @@ function useDebounceCallback(func, delay = 500, options) {
|
|
|
18323
18319
|
function useDebounceValue(initialValue, delay, options) {
|
|
18324
18320
|
const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);
|
|
18325
18321
|
const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;
|
|
18326
|
-
const [debouncedValue, setDebouncedValue] = (0,
|
|
18327
|
-
const previousValueRef = (0,
|
|
18322
|
+
const [debouncedValue, setDebouncedValue] = (0, import_react51.useState)(unwrappedInitialValue);
|
|
18323
|
+
const previousValueRef = (0, import_react51.useRef)(unwrappedInitialValue);
|
|
18328
18324
|
const updateDebouncedValue = useDebounceCallback(
|
|
18329
18325
|
setDebouncedValue,
|
|
18330
18326
|
delay,
|
|
@@ -18381,7 +18377,7 @@ var ErrorState = () => {
|
|
|
18381
18377
|
);
|
|
18382
18378
|
};
|
|
18383
18379
|
function OrganizationMembersView() {
|
|
18384
|
-
const { roles = [], organization, search } = (0,
|
|
18380
|
+
const { roles = [], organization, search } = (0, import_react52.useContext)(OrganizationContext);
|
|
18385
18381
|
const {
|
|
18386
18382
|
onChange: onSearchChange,
|
|
18387
18383
|
setVisibility: setSearchVisibility,
|
|
@@ -18390,11 +18386,11 @@ function OrganizationMembersView() {
|
|
|
18390
18386
|
const queryClient = (0, import_react_query15.useQueryClient)();
|
|
18391
18387
|
const transport = (0, import_connect_query36.useTransport)();
|
|
18392
18388
|
const organizationId = organization?.id || "";
|
|
18393
|
-
const [assignRoleConfig, setAssignRoleConfig] = (0,
|
|
18394
|
-
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 });
|
|
18395
18391
|
const title = `Members | ${organization?.title} | Organizations`;
|
|
18396
|
-
const [tableQuery, setTableQuery] = (0,
|
|
18397
|
-
const computedQuery = (0,
|
|
18392
|
+
const [tableQuery, setTableQuery] = (0, import_react52.useState)(INITIAL_QUERY5);
|
|
18393
|
+
const computedQuery = (0, import_react52.useMemo)(() => {
|
|
18398
18394
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS2);
|
|
18399
18395
|
return {
|
|
18400
18396
|
...tempQuery,
|
|
@@ -18432,7 +18428,7 @@ function OrganizationMembersView() {
|
|
|
18432
18428
|
await fetchNextPage();
|
|
18433
18429
|
}
|
|
18434
18430
|
};
|
|
18435
|
-
(0,
|
|
18431
|
+
(0, import_react52.useEffect)(() => {
|
|
18436
18432
|
setSearchVisibility(true);
|
|
18437
18433
|
return () => {
|
|
18438
18434
|
onSearchChange("");
|
|
@@ -18530,8 +18526,8 @@ function OrganizationMembersView() {
|
|
|
18530
18526
|
// admin/views/organizations/details/projects/index.tsx
|
|
18531
18527
|
var import_apsara96 = require("@raystack/apsara");
|
|
18532
18528
|
|
|
18533
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18534
|
-
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";
|
|
18535
18531
|
var css61 = `._container_1rf4u_1 {
|
|
18536
18532
|
width: 100%;
|
|
18537
18533
|
}
|
|
@@ -18588,13 +18584,13 @@ var css61 = `._container_1rf4u_1 {
|
|
|
18588
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" };
|
|
18589
18585
|
|
|
18590
18586
|
// admin/views/organizations/details/projects/index.tsx
|
|
18591
|
-
var
|
|
18587
|
+
var import_react57 = require("react");
|
|
18592
18588
|
|
|
18593
18589
|
// admin/views/organizations/details/projects/columns.tsx
|
|
18594
18590
|
var import_apsara90 = require("@raystack/apsara");
|
|
18595
18591
|
|
|
18596
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18597
|
-
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";
|
|
18598
18594
|
var css62 = `._container_1rf4u_1 {
|
|
18599
18595
|
width: 100%;
|
|
18600
18596
|
}
|
|
@@ -18770,10 +18766,10 @@ function RenameProjectDialog({
|
|
|
18770
18766
|
}
|
|
18771
18767
|
|
|
18772
18768
|
// admin/views/organizations/details/projects/columns.tsx
|
|
18773
|
-
var
|
|
18769
|
+
var import_react54 = require("react");
|
|
18774
18770
|
|
|
18775
18771
|
// admin/views/organizations/details/projects/use-add-project-members.tsx
|
|
18776
|
-
var
|
|
18772
|
+
var import_react53 = require("react");
|
|
18777
18773
|
var import_apsara89 = require("@raystack/apsara");
|
|
18778
18774
|
var import_connect_query38 = require("@connectrpc/connect-query");
|
|
18779
18775
|
var import_frontier42 = require("@raystack/proton/frontier");
|
|
@@ -18781,8 +18777,8 @@ var import_protobuf25 = require("@bufbuild/protobuf");
|
|
|
18781
18777
|
function useAddProjectMembers({ projectId }) {
|
|
18782
18778
|
const t = useTerminology();
|
|
18783
18779
|
const memberLabel = t.member({ case: "capital" });
|
|
18784
|
-
const { orgMembersMap } = (0,
|
|
18785
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
18780
|
+
const { orgMembersMap } = (0, import_react53.useContext)(OrganizationContext);
|
|
18781
|
+
const [searchQuery, setSearchQuery] = (0, import_react53.useState)("");
|
|
18786
18782
|
const { data: projectMembers, isLoading, refetch } = (0, import_connect_query38.useQuery)(
|
|
18787
18783
|
import_frontier42.FrontierServiceQueries.listProjectUsers,
|
|
18788
18784
|
(0, import_protobuf25.create)(import_frontier42.ListProjectUsersRequestSchema, { id: projectId }),
|
|
@@ -18791,7 +18787,7 @@ function useAddProjectMembers({ projectId }) {
|
|
|
18791
18787
|
select: (data) => data?.users || []
|
|
18792
18788
|
}
|
|
18793
18789
|
);
|
|
18794
|
-
const nonMembers = (0,
|
|
18790
|
+
const nonMembers = (0, import_react53.useMemo)(() => {
|
|
18795
18791
|
if (!projectMembers)
|
|
18796
18792
|
return [];
|
|
18797
18793
|
const memberSet = new Set(projectMembers.map((member) => member.id));
|
|
@@ -18801,40 +18797,53 @@ function useAddProjectMembers({ projectId }) {
|
|
|
18801
18797
|
return aName < bName ? -1 : 1;
|
|
18802
18798
|
});
|
|
18803
18799
|
}, [projectMembers, orgMembersMap]);
|
|
18804
|
-
const eligibleMembers = (0,
|
|
18800
|
+
const eligibleMembers = (0, import_react53.useMemo)(() => {
|
|
18805
18801
|
return searchQuery ? nonMembers.filter((member) => {
|
|
18806
18802
|
const name = member.title || member.email || "";
|
|
18807
18803
|
return name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
18808
18804
|
}) : nonMembers;
|
|
18809
18805
|
}, [nonMembers, searchQuery]);
|
|
18810
|
-
const {
|
|
18811
|
-
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]
|
|
18812
18817
|
);
|
|
18813
|
-
const
|
|
18818
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query38.useMutation)(
|
|
18819
|
+
import_frontier42.FrontierServiceQueries.setProjectMemberRole
|
|
18820
|
+
);
|
|
18821
|
+
const addMember = (0, import_react53.useCallback)(
|
|
18814
18822
|
async (userId) => {
|
|
18815
|
-
if (!userId || !projectId)
|
|
18823
|
+
if (!userId || !projectId || !viewerRoleId)
|
|
18816
18824
|
return;
|
|
18817
18825
|
try {
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
principal,
|
|
18825
|
-
resource
|
|
18826
|
-
}
|
|
18826
|
+
await setProjectMemberRole(
|
|
18827
|
+
(0, import_protobuf25.create)(import_frontier42.SetProjectMemberRoleRequestSchema, {
|
|
18828
|
+
projectId,
|
|
18829
|
+
principalId: userId,
|
|
18830
|
+
principalType: SCOPES.USER,
|
|
18831
|
+
roleId: viewerRoleId
|
|
18827
18832
|
})
|
|
18828
18833
|
);
|
|
18829
18834
|
import_apsara89.toast.success(`${memberLabel} added`);
|
|
18830
18835
|
await refetch();
|
|
18831
18836
|
return projectMembers;
|
|
18832
18837
|
} catch (error) {
|
|
18833
|
-
|
|
18834
|
-
|
|
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
|
+
});
|
|
18835
18844
|
}
|
|
18836
18845
|
},
|
|
18837
|
-
[projectId,
|
|
18846
|
+
[projectId, setProjectMemberRole, refetch, projectMembers, memberLabel, viewerRoleId]
|
|
18838
18847
|
);
|
|
18839
18848
|
return {
|
|
18840
18849
|
isLoading,
|
|
@@ -18944,8 +18953,8 @@ function ProjectActions({
|
|
|
18944
18953
|
project,
|
|
18945
18954
|
handleProjectUpdate
|
|
18946
18955
|
}) {
|
|
18947
|
-
const [open, setOpen] = (0,
|
|
18948
|
-
const [isRenameDialogOpen, setIsRenameDialogOpen] = (0,
|
|
18956
|
+
const [open, setOpen] = (0, import_react54.useState)(false);
|
|
18957
|
+
const [isRenameDialogOpen, setIsRenameDialogOpen] = (0, import_react54.useState)(false);
|
|
18949
18958
|
const preventClickBubbling = (e) => {
|
|
18950
18959
|
e.stopPropagation();
|
|
18951
18960
|
};
|
|
@@ -19082,93 +19091,92 @@ var import_connect_query42 = require("@connectrpc/connect-query");
|
|
|
19082
19091
|
|
|
19083
19092
|
// admin/views/organizations/details/projects/members/index.tsx
|
|
19084
19093
|
var import_apsara95 = require("@raystack/apsara");
|
|
19085
|
-
var
|
|
19094
|
+
var import_react56 = require("react");
|
|
19086
19095
|
var import_frontier45 = require("@raystack/proton/frontier");
|
|
19087
19096
|
var import_protobuf28 = require("@bufbuild/protobuf");
|
|
19088
19097
|
var import_connect_query41 = require("@connectrpc/connect-query");
|
|
19089
19098
|
var import_hooks4 = require("@raystack/apsara/hooks");
|
|
19090
19099
|
|
|
19091
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19092
|
-
var digest63 = "
|
|
19093
|
-
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 {
|
|
19094
19103
|
flex: 1;
|
|
19095
19104
|
}
|
|
19096
19105
|
|
|
19097
|
-
._dialog-
|
|
19106
|
+
._dialog-content_1k2kc_5 {
|
|
19098
19107
|
height: 70vh;
|
|
19099
19108
|
width: 80vw;
|
|
19100
19109
|
}
|
|
19101
19110
|
|
|
19102
|
-
._dialog-
|
|
19111
|
+
._dialog-body_1k2kc_10 {
|
|
19103
19112
|
height: 100%;
|
|
19104
19113
|
}
|
|
19105
19114
|
|
|
19106
|
-
._empty-
|
|
19115
|
+
._empty-state_1k2kc_14 {
|
|
19107
19116
|
height: 100%;
|
|
19108
19117
|
}
|
|
19109
19118
|
|
|
19110
|
-
._empty-state-
|
|
19119
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19111
19120
|
max-width: 360px;
|
|
19112
19121
|
text-wrap: auto;
|
|
19113
19122
|
}
|
|
19114
19123
|
|
|
19115
|
-
.
|
|
19124
|
+
._table_1k2kc_23 {
|
|
19116
19125
|
width: 100%;
|
|
19117
|
-
height: 100%;
|
|
19118
19126
|
table-layout: fixed;
|
|
19119
19127
|
}
|
|
19120
19128
|
|
|
19121
|
-
._table-
|
|
19129
|
+
._table-wrapper_1k2kc_28 {
|
|
19122
19130
|
/* Toolbar height */
|
|
19123
19131
|
max-height: calc(100% - 90px);
|
|
19124
19132
|
overflow: scroll;
|
|
19125
19133
|
}
|
|
19126
19134
|
|
|
19127
|
-
._table-
|
|
19135
|
+
._table-header_1k2kc_34 {
|
|
19128
19136
|
/* position: relative; */
|
|
19129
19137
|
z-index: 2;
|
|
19130
19138
|
}
|
|
19131
19139
|
|
|
19132
|
-
._table-
|
|
19140
|
+
._table-search_1k2kc_39 {
|
|
19133
19141
|
max-width: 360px;
|
|
19134
19142
|
}
|
|
19135
19143
|
|
|
19136
|
-
._table-content-
|
|
19144
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19137
19145
|
height: 100%;
|
|
19138
19146
|
}
|
|
19139
19147
|
|
|
19140
|
-
._table-action-
|
|
19148
|
+
._table-action-column_1k2kc_47 {
|
|
19141
19149
|
width: 24px;
|
|
19142
19150
|
}
|
|
19143
19151
|
|
|
19144
|
-
._table-action-
|
|
19152
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19145
19153
|
z-index: 10000;
|
|
19146
19154
|
min-width: 150px;
|
|
19147
19155
|
}
|
|
19148
19156
|
|
|
19149
|
-
._action-dialog-
|
|
19157
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19150
19158
|
z-index: 10001;
|
|
19151
19159
|
}
|
|
19152
19160
|
|
|
19153
|
-
._action-dialog-
|
|
19161
|
+
._action-dialog-content_1k2kc_60 {
|
|
19154
19162
|
z-index: 10002;
|
|
19155
19163
|
}
|
|
19156
19164
|
|
|
19157
|
-
._add-member-
|
|
19165
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19158
19166
|
width: 240px;
|
|
19159
19167
|
/* position: relative; */
|
|
19160
19168
|
}
|
|
19161
19169
|
|
|
19162
|
-
._add-member-dropdown-
|
|
19170
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19163
19171
|
width: 100%;
|
|
19164
19172
|
}
|
|
19165
|
-
|
|
19173
|
+
|
|
19174
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19166
19175
|
max-width: 100%;
|
|
19167
19176
|
overflow: hidden;
|
|
19168
19177
|
text-overflow: ellipsis;
|
|
19169
19178
|
white-space: nowrap;
|
|
19170
|
-
}
|
|
19171
|
-
`;
|
|
19179
|
+
}`;
|
|
19172
19180
|
(function() {
|
|
19173
19181
|
if (typeof document === "undefined") {
|
|
19174
19182
|
return;
|
|
@@ -19180,89 +19188,88 @@ var css63 = `._flex1_nxqqi_1 {
|
|
|
19180
19188
|
document.head.appendChild(el);
|
|
19181
19189
|
}
|
|
19182
19190
|
})();
|
|
19183
|
-
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" };
|
|
19184
19192
|
|
|
19185
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19186
|
-
var digest64 = "
|
|
19187
|
-
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 {
|
|
19188
19196
|
flex: 1;
|
|
19189
19197
|
}
|
|
19190
19198
|
|
|
19191
|
-
._dialog-
|
|
19199
|
+
._dialog-content_1k2kc_5 {
|
|
19192
19200
|
height: 70vh;
|
|
19193
19201
|
width: 80vw;
|
|
19194
19202
|
}
|
|
19195
19203
|
|
|
19196
|
-
._dialog-
|
|
19204
|
+
._dialog-body_1k2kc_10 {
|
|
19197
19205
|
height: 100%;
|
|
19198
19206
|
}
|
|
19199
19207
|
|
|
19200
|
-
._empty-
|
|
19208
|
+
._empty-state_1k2kc_14 {
|
|
19201
19209
|
height: 100%;
|
|
19202
19210
|
}
|
|
19203
19211
|
|
|
19204
|
-
._empty-state-
|
|
19212
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19205
19213
|
max-width: 360px;
|
|
19206
19214
|
text-wrap: auto;
|
|
19207
19215
|
}
|
|
19208
19216
|
|
|
19209
|
-
.
|
|
19217
|
+
._table_1k2kc_23 {
|
|
19210
19218
|
width: 100%;
|
|
19211
|
-
height: 100%;
|
|
19212
19219
|
table-layout: fixed;
|
|
19213
19220
|
}
|
|
19214
19221
|
|
|
19215
|
-
._table-
|
|
19222
|
+
._table-wrapper_1k2kc_28 {
|
|
19216
19223
|
/* Toolbar height */
|
|
19217
19224
|
max-height: calc(100% - 90px);
|
|
19218
19225
|
overflow: scroll;
|
|
19219
19226
|
}
|
|
19220
19227
|
|
|
19221
|
-
._table-
|
|
19228
|
+
._table-header_1k2kc_34 {
|
|
19222
19229
|
/* position: relative; */
|
|
19223
19230
|
z-index: 2;
|
|
19224
19231
|
}
|
|
19225
19232
|
|
|
19226
|
-
._table-
|
|
19233
|
+
._table-search_1k2kc_39 {
|
|
19227
19234
|
max-width: 360px;
|
|
19228
19235
|
}
|
|
19229
19236
|
|
|
19230
|
-
._table-content-
|
|
19237
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19231
19238
|
height: 100%;
|
|
19232
19239
|
}
|
|
19233
19240
|
|
|
19234
|
-
._table-action-
|
|
19241
|
+
._table-action-column_1k2kc_47 {
|
|
19235
19242
|
width: 24px;
|
|
19236
19243
|
}
|
|
19237
19244
|
|
|
19238
|
-
._table-action-
|
|
19245
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19239
19246
|
z-index: 10000;
|
|
19240
19247
|
min-width: 150px;
|
|
19241
19248
|
}
|
|
19242
19249
|
|
|
19243
|
-
._action-dialog-
|
|
19250
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19244
19251
|
z-index: 10001;
|
|
19245
19252
|
}
|
|
19246
19253
|
|
|
19247
|
-
._action-dialog-
|
|
19254
|
+
._action-dialog-content_1k2kc_60 {
|
|
19248
19255
|
z-index: 10002;
|
|
19249
19256
|
}
|
|
19250
19257
|
|
|
19251
|
-
._add-member-
|
|
19258
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19252
19259
|
width: 240px;
|
|
19253
19260
|
/* position: relative; */
|
|
19254
19261
|
}
|
|
19255
19262
|
|
|
19256
|
-
._add-member-dropdown-
|
|
19263
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19257
19264
|
width: 100%;
|
|
19258
19265
|
}
|
|
19259
|
-
|
|
19266
|
+
|
|
19267
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19260
19268
|
max-width: 100%;
|
|
19261
19269
|
overflow: hidden;
|
|
19262
19270
|
text-overflow: ellipsis;
|
|
19263
19271
|
white-space: nowrap;
|
|
19264
|
-
}
|
|
19265
|
-
`;
|
|
19272
|
+
}`;
|
|
19266
19273
|
(function() {
|
|
19267
19274
|
if (typeof document === "undefined") {
|
|
19268
19275
|
return;
|
|
@@ -19274,7 +19281,7 @@ var css64 = `._flex1_nxqqi_1 {
|
|
|
19274
19281
|
document.head.appendChild(el);
|
|
19275
19282
|
}
|
|
19276
19283
|
})();
|
|
19277
|
-
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" };
|
|
19278
19285
|
|
|
19279
19286
|
// admin/views/organizations/details/projects/members/columns.tsx
|
|
19280
19287
|
var import_apsara91 = require("@raystack/apsara");
|
|
@@ -19378,87 +19385,86 @@ var getColumns14 = ({
|
|
|
19378
19385
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19379
19386
|
var import_apsara92 = require("@raystack/apsara");
|
|
19380
19387
|
|
|
19381
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19382
|
-
var digest65 = "
|
|
19383
|
-
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 {
|
|
19384
19391
|
flex: 1;
|
|
19385
19392
|
}
|
|
19386
19393
|
|
|
19387
|
-
._dialog-
|
|
19394
|
+
._dialog-content_1k2kc_5 {
|
|
19388
19395
|
height: 70vh;
|
|
19389
19396
|
width: 80vw;
|
|
19390
19397
|
}
|
|
19391
19398
|
|
|
19392
|
-
._dialog-
|
|
19399
|
+
._dialog-body_1k2kc_10 {
|
|
19393
19400
|
height: 100%;
|
|
19394
19401
|
}
|
|
19395
19402
|
|
|
19396
|
-
._empty-
|
|
19403
|
+
._empty-state_1k2kc_14 {
|
|
19397
19404
|
height: 100%;
|
|
19398
19405
|
}
|
|
19399
19406
|
|
|
19400
|
-
._empty-state-
|
|
19407
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19401
19408
|
max-width: 360px;
|
|
19402
19409
|
text-wrap: auto;
|
|
19403
19410
|
}
|
|
19404
19411
|
|
|
19405
|
-
.
|
|
19412
|
+
._table_1k2kc_23 {
|
|
19406
19413
|
width: 100%;
|
|
19407
|
-
height: 100%;
|
|
19408
19414
|
table-layout: fixed;
|
|
19409
19415
|
}
|
|
19410
19416
|
|
|
19411
|
-
._table-
|
|
19417
|
+
._table-wrapper_1k2kc_28 {
|
|
19412
19418
|
/* Toolbar height */
|
|
19413
19419
|
max-height: calc(100% - 90px);
|
|
19414
19420
|
overflow: scroll;
|
|
19415
19421
|
}
|
|
19416
19422
|
|
|
19417
|
-
._table-
|
|
19423
|
+
._table-header_1k2kc_34 {
|
|
19418
19424
|
/* position: relative; */
|
|
19419
19425
|
z-index: 2;
|
|
19420
19426
|
}
|
|
19421
19427
|
|
|
19422
|
-
._table-
|
|
19428
|
+
._table-search_1k2kc_39 {
|
|
19423
19429
|
max-width: 360px;
|
|
19424
19430
|
}
|
|
19425
19431
|
|
|
19426
|
-
._table-content-
|
|
19432
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19427
19433
|
height: 100%;
|
|
19428
19434
|
}
|
|
19429
19435
|
|
|
19430
|
-
._table-action-
|
|
19436
|
+
._table-action-column_1k2kc_47 {
|
|
19431
19437
|
width: 24px;
|
|
19432
19438
|
}
|
|
19433
19439
|
|
|
19434
|
-
._table-action-
|
|
19440
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19435
19441
|
z-index: 10000;
|
|
19436
19442
|
min-width: 150px;
|
|
19437
19443
|
}
|
|
19438
19444
|
|
|
19439
|
-
._action-dialog-
|
|
19445
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19440
19446
|
z-index: 10001;
|
|
19441
19447
|
}
|
|
19442
19448
|
|
|
19443
|
-
._action-dialog-
|
|
19449
|
+
._action-dialog-content_1k2kc_60 {
|
|
19444
19450
|
z-index: 10002;
|
|
19445
19451
|
}
|
|
19446
19452
|
|
|
19447
|
-
._add-member-
|
|
19453
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19448
19454
|
width: 240px;
|
|
19449
19455
|
/* position: relative; */
|
|
19450
19456
|
}
|
|
19451
19457
|
|
|
19452
|
-
._add-member-dropdown-
|
|
19458
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19453
19459
|
width: 100%;
|
|
19454
19460
|
}
|
|
19455
|
-
|
|
19461
|
+
|
|
19462
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19456
19463
|
max-width: 100%;
|
|
19457
19464
|
overflow: hidden;
|
|
19458
19465
|
text-overflow: ellipsis;
|
|
19459
19466
|
white-space: nowrap;
|
|
19460
|
-
}
|
|
19461
|
-
`;
|
|
19467
|
+
}`;
|
|
19462
19468
|
(function() {
|
|
19463
19469
|
if (typeof document === "undefined") {
|
|
19464
19470
|
return;
|
|
@@ -19470,21 +19476,17 @@ var css65 = `._flex1_nxqqi_1 {
|
|
|
19470
19476
|
document.head.appendChild(el);
|
|
19471
19477
|
}
|
|
19472
19478
|
})();
|
|
19473
|
-
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" };
|
|
19474
19480
|
|
|
19475
19481
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19476
|
-
var import_react56 = require("react");
|
|
19477
19482
|
var import_frontier43 = require("@raystack/proton/frontier");
|
|
19478
19483
|
var import_protobuf26 = require("@bufbuild/protobuf");
|
|
19479
19484
|
var import_connect_query39 = require("@connectrpc/connect-query");
|
|
19480
|
-
var import_connect3 = require("@connectrpc/connect");
|
|
19481
19485
|
var import_react_hook_form13 = require("react-hook-form");
|
|
19482
19486
|
var import_zod18 = require("@hookform/resolvers/zod");
|
|
19483
19487
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
19484
19488
|
var formSchema2 = external_exports.object({
|
|
19485
|
-
|
|
19486
|
-
message: "At least one role must be selected"
|
|
19487
|
-
})
|
|
19489
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
19488
19490
|
});
|
|
19489
19491
|
var AssignRole2 = ({
|
|
19490
19492
|
roles = [],
|
|
@@ -19493,84 +19495,36 @@ var AssignRole2 = ({
|
|
|
19493
19495
|
onRoleUpdate,
|
|
19494
19496
|
onClose
|
|
19495
19497
|
}) => {
|
|
19496
|
-
const
|
|
19498
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
19497
19499
|
const {
|
|
19498
19500
|
handleSubmit,
|
|
19499
19501
|
watch,
|
|
19500
19502
|
setValue,
|
|
19501
|
-
formState: { isSubmitting, errors }
|
|
19503
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
19502
19504
|
} = (0, import_react_hook_form13.useForm)({
|
|
19503
19505
|
defaultValues: {
|
|
19504
|
-
|
|
19506
|
+
roleId: currentRoleId
|
|
19505
19507
|
},
|
|
19506
19508
|
resolver: (0, import_zod18.zodResolver)(formSchema2)
|
|
19507
19509
|
});
|
|
19508
|
-
const { mutateAsync:
|
|
19509
|
-
import_frontier43.FrontierServiceQueries.
|
|
19510
|
-
);
|
|
19511
|
-
const { mutateAsync: createPolicy } = (0, import_connect_query39.useMutation)(
|
|
19512
|
-
import_frontier43.FrontierServiceQueries.createPolicy
|
|
19513
|
-
);
|
|
19514
|
-
const roleIds = watch("roleIds");
|
|
19515
|
-
function onCheckedChange(value, roleId) {
|
|
19516
|
-
if (!roleId)
|
|
19517
|
-
return;
|
|
19518
|
-
const currentRoles = new Set(roleIds);
|
|
19519
|
-
if (value) {
|
|
19520
|
-
currentRoles.add(roleId);
|
|
19521
|
-
} else {
|
|
19522
|
-
currentRoles.delete(roleId);
|
|
19523
|
-
}
|
|
19524
|
-
setValue("roleIds", currentRoles);
|
|
19525
|
-
}
|
|
19526
|
-
const checkRole = (0, import_react56.useCallback)(
|
|
19527
|
-
(roleId) => {
|
|
19528
|
-
if (!roleId)
|
|
19529
|
-
return false;
|
|
19530
|
-
return roleIds?.has(roleId) || false;
|
|
19531
|
-
},
|
|
19532
|
-
[roleIds]
|
|
19510
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query39.useMutation)(
|
|
19511
|
+
import_frontier43.FrontierServiceQueries.setProjectMemberRole
|
|
19533
19512
|
);
|
|
19513
|
+
const selectedRoleId = watch("roleId");
|
|
19534
19514
|
const onSubmit = async (data) => {
|
|
19535
19515
|
try {
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
(0, import_protobuf26.create)(import_frontier43.ListPoliciesRequestSchema, {
|
|
19516
|
+
await setProjectMemberRole(
|
|
19517
|
+
(0, import_protobuf26.create)(import_frontier43.SetProjectMemberRoleRequestSchema, {
|
|
19539
19518
|
projectId,
|
|
19540
|
-
|
|
19519
|
+
principalId: user?.id || "",
|
|
19520
|
+
principalType: SCOPES.USER,
|
|
19521
|
+
roleId: data.roleId
|
|
19541
19522
|
})
|
|
19542
19523
|
);
|
|
19543
|
-
const policies = policiesResp.policies || [];
|
|
19544
|
-
const removedRolesPolicies = policies.filter(
|
|
19545
|
-
(policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
|
|
19546
|
-
);
|
|
19547
|
-
await Promise.all(
|
|
19548
|
-
removedRolesPolicies.map(
|
|
19549
|
-
(policy) => deletePolicy(
|
|
19550
|
-
(0, import_protobuf26.create)(import_frontier43.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
19551
|
-
)
|
|
19552
|
-
)
|
|
19553
|
-
);
|
|
19554
|
-
const resource = `app/project:${projectId}`;
|
|
19555
|
-
const principal = `app/user:${user?.id}`;
|
|
19556
|
-
const assignedRolesArr = Array.from(data.roleIds);
|
|
19557
|
-
await Promise.all(
|
|
19558
|
-
assignedRolesArr.map(
|
|
19559
|
-
(roleId) => createPolicy(
|
|
19560
|
-
(0, import_protobuf26.create)(import_frontier43.CreatePolicyRequestSchema, {
|
|
19561
|
-
body: {
|
|
19562
|
-
roleId,
|
|
19563
|
-
resource,
|
|
19564
|
-
principal
|
|
19565
|
-
}
|
|
19566
|
-
})
|
|
19567
|
-
)
|
|
19568
|
-
)
|
|
19569
|
-
);
|
|
19570
19524
|
if (onRoleUpdate) {
|
|
19571
19525
|
onRoleUpdate({
|
|
19572
19526
|
...user,
|
|
19573
|
-
roleIds:
|
|
19527
|
+
roleIds: [data.roleId]
|
|
19574
19528
|
});
|
|
19575
19529
|
}
|
|
19576
19530
|
import_apsara92.toast.success("Role assigned successfully");
|
|
@@ -19596,7 +19550,7 @@ var AssignRole2 = ({
|
|
|
19596
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: [
|
|
19597
19551
|
roles.map((role) => {
|
|
19598
19552
|
const htmlId = `role-${role.id}`;
|
|
19599
|
-
const checked =
|
|
19553
|
+
const checked = selectedRoleId === role.id;
|
|
19600
19554
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Flex, { gap: 3, children: [
|
|
19601
19555
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
19602
19556
|
import_apsara92.Checkbox,
|
|
@@ -19604,13 +19558,15 @@ var AssignRole2 = ({
|
|
|
19604
19558
|
id: htmlId,
|
|
19605
19559
|
"data-test-id": `role-checkbox-${role.id}`,
|
|
19606
19560
|
checked,
|
|
19607
|
-
onCheckedChange: (
|
|
19561
|
+
onCheckedChange: () => setValue("roleId", role.id || "", {
|
|
19562
|
+
shouldDirty: true
|
|
19563
|
+
})
|
|
19608
19564
|
}
|
|
19609
19565
|
),
|
|
19610
19566
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_apsara92.Label, { htmlFor: htmlId, children: role.title })
|
|
19611
19567
|
] }, role.id);
|
|
19612
19568
|
}),
|
|
19613
|
-
errors.
|
|
19569
|
+
errors.roleId && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_apsara92.Text, { variant: "danger", children: errors.roleId.message })
|
|
19614
19570
|
] }) })
|
|
19615
19571
|
] }) }),
|
|
19616
19572
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Dialog.Footer, { children: [
|
|
@@ -19628,6 +19584,7 @@ var AssignRole2 = ({
|
|
|
19628
19584
|
import_apsara92.Button,
|
|
19629
19585
|
{
|
|
19630
19586
|
type: "submit",
|
|
19587
|
+
disabled: !isDirty2,
|
|
19631
19588
|
"data-test-id": "assign-role-update-button",
|
|
19632
19589
|
loading: isSubmitting,
|
|
19633
19590
|
loaderText: "Updating...",
|
|
@@ -19642,93 +19599,91 @@ var AssignRole2 = ({
|
|
|
19642
19599
|
};
|
|
19643
19600
|
|
|
19644
19601
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19645
|
-
var
|
|
19602
|
+
var import_react55 = require("react");
|
|
19646
19603
|
var import_frontier44 = require("@raystack/proton/frontier");
|
|
19647
19604
|
var import_protobuf27 = require("@bufbuild/protobuf");
|
|
19648
19605
|
var import_connect_query40 = require("@connectrpc/connect-query");
|
|
19649
|
-
var import_connect4 = require("@connectrpc/connect");
|
|
19650
19606
|
|
|
19651
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19652
|
-
var digest66 = "
|
|
19653
|
-
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 {
|
|
19654
19610
|
flex: 1;
|
|
19655
19611
|
}
|
|
19656
19612
|
|
|
19657
|
-
._dialog-
|
|
19613
|
+
._dialog-content_1k2kc_5 {
|
|
19658
19614
|
height: 70vh;
|
|
19659
19615
|
width: 80vw;
|
|
19660
19616
|
}
|
|
19661
19617
|
|
|
19662
|
-
._dialog-
|
|
19618
|
+
._dialog-body_1k2kc_10 {
|
|
19663
19619
|
height: 100%;
|
|
19664
19620
|
}
|
|
19665
19621
|
|
|
19666
|
-
._empty-
|
|
19622
|
+
._empty-state_1k2kc_14 {
|
|
19667
19623
|
height: 100%;
|
|
19668
19624
|
}
|
|
19669
19625
|
|
|
19670
|
-
._empty-state-
|
|
19626
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19671
19627
|
max-width: 360px;
|
|
19672
19628
|
text-wrap: auto;
|
|
19673
19629
|
}
|
|
19674
19630
|
|
|
19675
|
-
.
|
|
19631
|
+
._table_1k2kc_23 {
|
|
19676
19632
|
width: 100%;
|
|
19677
|
-
height: 100%;
|
|
19678
19633
|
table-layout: fixed;
|
|
19679
19634
|
}
|
|
19680
19635
|
|
|
19681
|
-
._table-
|
|
19636
|
+
._table-wrapper_1k2kc_28 {
|
|
19682
19637
|
/* Toolbar height */
|
|
19683
19638
|
max-height: calc(100% - 90px);
|
|
19684
19639
|
overflow: scroll;
|
|
19685
19640
|
}
|
|
19686
19641
|
|
|
19687
|
-
._table-
|
|
19642
|
+
._table-header_1k2kc_34 {
|
|
19688
19643
|
/* position: relative; */
|
|
19689
19644
|
z-index: 2;
|
|
19690
19645
|
}
|
|
19691
19646
|
|
|
19692
|
-
._table-
|
|
19647
|
+
._table-search_1k2kc_39 {
|
|
19693
19648
|
max-width: 360px;
|
|
19694
19649
|
}
|
|
19695
19650
|
|
|
19696
|
-
._table-content-
|
|
19651
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19697
19652
|
height: 100%;
|
|
19698
19653
|
}
|
|
19699
19654
|
|
|
19700
|
-
._table-action-
|
|
19655
|
+
._table-action-column_1k2kc_47 {
|
|
19701
19656
|
width: 24px;
|
|
19702
19657
|
}
|
|
19703
19658
|
|
|
19704
|
-
._table-action-
|
|
19659
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19705
19660
|
z-index: 10000;
|
|
19706
19661
|
min-width: 150px;
|
|
19707
19662
|
}
|
|
19708
19663
|
|
|
19709
|
-
._action-dialog-
|
|
19664
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19710
19665
|
z-index: 10001;
|
|
19711
19666
|
}
|
|
19712
19667
|
|
|
19713
|
-
._action-dialog-
|
|
19668
|
+
._action-dialog-content_1k2kc_60 {
|
|
19714
19669
|
z-index: 10002;
|
|
19715
19670
|
}
|
|
19716
19671
|
|
|
19717
|
-
._add-member-
|
|
19672
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19718
19673
|
width: 240px;
|
|
19719
19674
|
/* position: relative; */
|
|
19720
19675
|
}
|
|
19721
19676
|
|
|
19722
|
-
._add-member-dropdown-
|
|
19677
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19723
19678
|
width: 100%;
|
|
19724
19679
|
}
|
|
19725
|
-
|
|
19680
|
+
|
|
19681
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19726
19682
|
max-width: 100%;
|
|
19727
19683
|
overflow: hidden;
|
|
19728
19684
|
text-overflow: ellipsis;
|
|
19729
19685
|
white-space: nowrap;
|
|
19730
|
-
}
|
|
19731
|
-
`;
|
|
19686
|
+
}`;
|
|
19732
19687
|
(function() {
|
|
19733
19688
|
if (typeof document === "undefined") {
|
|
19734
19689
|
return;
|
|
@@ -19740,7 +19695,7 @@ var css66 = `._flex1_nxqqi_1 {
|
|
|
19740
19695
|
document.head.appendChild(el);
|
|
19741
19696
|
}
|
|
19742
19697
|
})();
|
|
19743
|
-
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" };
|
|
19744
19699
|
|
|
19745
19700
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19746
19701
|
var import_apsara93 = require("@raystack/apsara");
|
|
@@ -19752,31 +19707,22 @@ var RemoveMember2 = ({
|
|
|
19752
19707
|
onClose
|
|
19753
19708
|
}) => {
|
|
19754
19709
|
const t = useTerminology();
|
|
19755
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
19756
|
-
const
|
|
19757
|
-
|
|
19758
|
-
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
|
|
19759
19713
|
);
|
|
19760
19714
|
async function onSubmit() {
|
|
19761
19715
|
try {
|
|
19762
19716
|
if (!user)
|
|
19763
19717
|
return;
|
|
19764
19718
|
setIsSubmitting(true);
|
|
19765
|
-
|
|
19766
|
-
|
|
19767
|
-
(0, import_protobuf27.create)(import_frontier44.ListPoliciesRequestSchema, {
|
|
19719
|
+
await removeProjectMember(
|
|
19720
|
+
(0, import_protobuf27.create)(import_frontier44.RemoveProjectMemberRequestSchema, {
|
|
19768
19721
|
projectId,
|
|
19769
|
-
|
|
19722
|
+
principalId: user.id,
|
|
19723
|
+
principalType: "app/user"
|
|
19770
19724
|
})
|
|
19771
19725
|
);
|
|
19772
|
-
const policies = policiesResp.policies || [];
|
|
19773
|
-
await Promise.all(
|
|
19774
|
-
policies.map(
|
|
19775
|
-
(policy) => deletePolicy(
|
|
19776
|
-
(0, import_protobuf27.create)(import_frontier44.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
19777
|
-
)
|
|
19778
|
-
)
|
|
19779
|
-
);
|
|
19780
19726
|
if (onRemove) {
|
|
19781
19727
|
onRemove(user);
|
|
19782
19728
|
}
|
|
@@ -19850,87 +19796,86 @@ var RemoveMember2 = ({
|
|
|
19850
19796
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
19851
19797
|
var import_apsara94 = require("@raystack/apsara");
|
|
19852
19798
|
|
|
19853
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19854
|
-
var digest67 = "
|
|
19855
|
-
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 {
|
|
19856
19802
|
flex: 1;
|
|
19857
19803
|
}
|
|
19858
19804
|
|
|
19859
|
-
._dialog-
|
|
19805
|
+
._dialog-content_1k2kc_5 {
|
|
19860
19806
|
height: 70vh;
|
|
19861
19807
|
width: 80vw;
|
|
19862
19808
|
}
|
|
19863
19809
|
|
|
19864
|
-
._dialog-
|
|
19810
|
+
._dialog-body_1k2kc_10 {
|
|
19865
19811
|
height: 100%;
|
|
19866
19812
|
}
|
|
19867
19813
|
|
|
19868
|
-
._empty-
|
|
19814
|
+
._empty-state_1k2kc_14 {
|
|
19869
19815
|
height: 100%;
|
|
19870
19816
|
}
|
|
19871
19817
|
|
|
19872
|
-
._empty-state-
|
|
19818
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19873
19819
|
max-width: 360px;
|
|
19874
19820
|
text-wrap: auto;
|
|
19875
19821
|
}
|
|
19876
19822
|
|
|
19877
|
-
.
|
|
19823
|
+
._table_1k2kc_23 {
|
|
19878
19824
|
width: 100%;
|
|
19879
|
-
height: 100%;
|
|
19880
19825
|
table-layout: fixed;
|
|
19881
19826
|
}
|
|
19882
19827
|
|
|
19883
|
-
._table-
|
|
19828
|
+
._table-wrapper_1k2kc_28 {
|
|
19884
19829
|
/* Toolbar height */
|
|
19885
19830
|
max-height: calc(100% - 90px);
|
|
19886
19831
|
overflow: scroll;
|
|
19887
19832
|
}
|
|
19888
19833
|
|
|
19889
|
-
._table-
|
|
19834
|
+
._table-header_1k2kc_34 {
|
|
19890
19835
|
/* position: relative; */
|
|
19891
19836
|
z-index: 2;
|
|
19892
19837
|
}
|
|
19893
19838
|
|
|
19894
|
-
._table-
|
|
19839
|
+
._table-search_1k2kc_39 {
|
|
19895
19840
|
max-width: 360px;
|
|
19896
19841
|
}
|
|
19897
19842
|
|
|
19898
|
-
._table-content-
|
|
19843
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19899
19844
|
height: 100%;
|
|
19900
19845
|
}
|
|
19901
19846
|
|
|
19902
|
-
._table-action-
|
|
19847
|
+
._table-action-column_1k2kc_47 {
|
|
19903
19848
|
width: 24px;
|
|
19904
19849
|
}
|
|
19905
19850
|
|
|
19906
|
-
._table-action-
|
|
19851
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19907
19852
|
z-index: 10000;
|
|
19908
19853
|
min-width: 150px;
|
|
19909
19854
|
}
|
|
19910
19855
|
|
|
19911
|
-
._action-dialog-
|
|
19856
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19912
19857
|
z-index: 10001;
|
|
19913
19858
|
}
|
|
19914
19859
|
|
|
19915
|
-
._action-dialog-
|
|
19860
|
+
._action-dialog-content_1k2kc_60 {
|
|
19916
19861
|
z-index: 10002;
|
|
19917
19862
|
}
|
|
19918
19863
|
|
|
19919
|
-
._add-member-
|
|
19864
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19920
19865
|
width: 240px;
|
|
19921
19866
|
/* position: relative; */
|
|
19922
19867
|
}
|
|
19923
19868
|
|
|
19924
|
-
._add-member-dropdown-
|
|
19869
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19925
19870
|
width: 100%;
|
|
19926
19871
|
}
|
|
19927
|
-
|
|
19872
|
+
|
|
19873
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19928
19874
|
max-width: 100%;
|
|
19929
19875
|
overflow: hidden;
|
|
19930
19876
|
text-overflow: ellipsis;
|
|
19931
19877
|
white-space: nowrap;
|
|
19932
|
-
}
|
|
19933
|
-
`;
|
|
19878
|
+
}`;
|
|
19934
19879
|
(function() {
|
|
19935
19880
|
if (typeof document === "undefined") {
|
|
19936
19881
|
return;
|
|
@@ -19942,7 +19887,7 @@ var css67 = `._flex1_nxqqi_1 {
|
|
|
19942
19887
|
document.head.appendChild(el);
|
|
19943
19888
|
}
|
|
19944
19889
|
})();
|
|
19945
|
-
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" };
|
|
19946
19891
|
|
|
19947
19892
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
19948
19893
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
@@ -20034,8 +19979,8 @@ var ProjectMembersDialog = ({
|
|
|
20034
19979
|
},
|
|
20035
19980
|
200
|
|
20036
19981
|
);
|
|
20037
|
-
const [assignRoleConfig, setAssignRoleConfig] = (0,
|
|
20038
|
-
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 });
|
|
20039
19984
|
const { data: project, isLoading: isProjectLoading, error: projectError } = (0, import_connect_query41.useQuery)(
|
|
20040
19985
|
import_frontier45.FrontierServiceQueries.getProject,
|
|
20041
19986
|
(0, import_protobuf28.create)(import_frontier45.GetProjectRequestSchema, { id: projectId }),
|
|
@@ -20081,7 +20026,7 @@ var ProjectMembersDialog = ({
|
|
|
20081
20026
|
}
|
|
20082
20027
|
);
|
|
20083
20028
|
const data = infiniteData?.pages?.flatMap((page) => page?.projectUsers || []) || [];
|
|
20084
|
-
const onTableQueryChange = (0,
|
|
20029
|
+
const onTableQueryChange = (0, import_react56.useCallback)((query) => {
|
|
20085
20030
|
const updatedQuery = {
|
|
20086
20031
|
...query,
|
|
20087
20032
|
offset: 0,
|
|
@@ -20098,7 +20043,7 @@ var ProjectMembersDialog = ({
|
|
|
20098
20043
|
rqlRequest: updatedRQLRequest
|
|
20099
20044
|
});
|
|
20100
20045
|
}, []);
|
|
20101
|
-
const handleLoadMore = (0,
|
|
20046
|
+
const handleLoadMore = (0, import_react56.useCallback)(async () => {
|
|
20102
20047
|
try {
|
|
20103
20048
|
if (!hasNextPage)
|
|
20104
20049
|
return;
|
|
@@ -20110,25 +20055,25 @@ var ProjectMembersDialog = ({
|
|
|
20110
20055
|
async function refetchMembers() {
|
|
20111
20056
|
await refetch();
|
|
20112
20057
|
}
|
|
20113
|
-
const openAssignRoleDialog = (0,
|
|
20058
|
+
const openAssignRoleDialog = (0, import_react56.useCallback)(
|
|
20114
20059
|
(user) => {
|
|
20115
20060
|
setAssignRoleConfig({ isOpen: true, user });
|
|
20116
20061
|
},
|
|
20117
20062
|
[]
|
|
20118
20063
|
);
|
|
20119
|
-
const closeAssignRoleDialog = (0,
|
|
20064
|
+
const closeAssignRoleDialog = (0, import_react56.useCallback)(() => {
|
|
20120
20065
|
setAssignRoleConfig({ isOpen: false, user: null });
|
|
20121
20066
|
}, []);
|
|
20122
|
-
const openRemoveMemberDialog = (0,
|
|
20067
|
+
const openRemoveMemberDialog = (0, import_react56.useCallback)(
|
|
20123
20068
|
(user) => {
|
|
20124
20069
|
setRemoveMemberConfig({ isOpen: true, user });
|
|
20125
20070
|
},
|
|
20126
20071
|
[]
|
|
20127
20072
|
);
|
|
20128
|
-
const closeRemoveMemberDialog = (0,
|
|
20073
|
+
const closeRemoveMemberDialog = (0, import_react56.useCallback)(() => {
|
|
20129
20074
|
setRemoveMemberConfig({ isOpen: false, user: null });
|
|
20130
20075
|
}, []);
|
|
20131
|
-
const columns = (0,
|
|
20076
|
+
const columns = (0, import_react56.useMemo)(
|
|
20132
20077
|
() => getColumns14({
|
|
20133
20078
|
roles: projectRoles,
|
|
20134
20079
|
handleAssignRoleAction: openAssignRoleDialog,
|
|
@@ -20265,20 +20210,20 @@ var ErrorState2 = () => {
|
|
|
20265
20210
|
};
|
|
20266
20211
|
function OrganizationProjectsView() {
|
|
20267
20212
|
const t = useTerminology();
|
|
20268
|
-
const { organization, search, orgMembersMap, isOrgMembersMapLoading } = (0,
|
|
20213
|
+
const { organization, search, orgMembersMap, isOrgMembersMapLoading } = (0, import_react57.useContext)(OrganizationContext);
|
|
20269
20214
|
const {
|
|
20270
20215
|
onChange: onSearchChange,
|
|
20271
20216
|
setVisibility: setSearchVisibility,
|
|
20272
20217
|
query: searchQuery
|
|
20273
20218
|
} = search;
|
|
20274
20219
|
const organizationId = organization?.id || "";
|
|
20275
|
-
const [memberDialogConfig, setMemberDialogConfig] = (0,
|
|
20220
|
+
const [memberDialogConfig, setMemberDialogConfig] = (0, import_react57.useState)({
|
|
20276
20221
|
open: false,
|
|
20277
20222
|
projectId: ""
|
|
20278
20223
|
});
|
|
20279
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20224
|
+
const [tableQuery, setTableQuery] = (0, import_react57.useState)(INITIAL_QUERY7);
|
|
20280
20225
|
const title = `${t.project({ plural: true, case: "capital" })} | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20281
|
-
const computedQuery = (0,
|
|
20226
|
+
const computedQuery = (0, import_react57.useMemo)(() => {
|
|
20282
20227
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS3);
|
|
20283
20228
|
return {
|
|
20284
20229
|
...tempQuery,
|
|
@@ -20320,7 +20265,7 @@ function OrganizationProjectsView() {
|
|
|
20320
20265
|
function handleProjectUpdate(project) {
|
|
20321
20266
|
refetchOrgProjects();
|
|
20322
20267
|
}
|
|
20323
|
-
(0,
|
|
20268
|
+
(0, import_react57.useEffect)(() => {
|
|
20324
20269
|
setSearchVisibility(true);
|
|
20325
20270
|
return () => {
|
|
20326
20271
|
onSearchChange("");
|
|
@@ -20386,8 +20331,8 @@ function OrganizationProjectsView() {
|
|
|
20386
20331
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20387
20332
|
var import_apsara98 = require("@raystack/apsara");
|
|
20388
20333
|
|
|
20389
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20390
|
-
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";
|
|
20391
20336
|
var css68 = `._empty-state_ct7gw_1 {
|
|
20392
20337
|
height: 100%;
|
|
20393
20338
|
}
|
|
@@ -20431,10 +20376,10 @@ var css68 = `._empty-state_ct7gw_1 {
|
|
|
20431
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" };
|
|
20432
20377
|
|
|
20433
20378
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20434
|
-
var
|
|
20379
|
+
var import_react58 = require("react");
|
|
20435
20380
|
|
|
20436
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20437
|
-
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";
|
|
20438
20383
|
var css69 = `._empty-state_ct7gw_1 {
|
|
20439
20384
|
height: 100%;
|
|
20440
20385
|
}
|
|
@@ -20600,16 +20545,16 @@ var ErrorState3 = () => {
|
|
|
20600
20545
|
};
|
|
20601
20546
|
function OrganizationInvoicesView() {
|
|
20602
20547
|
const t = useTerminology();
|
|
20603
|
-
const { organization, search } = (0,
|
|
20548
|
+
const { organization, search } = (0, import_react58.useContext)(OrganizationContext);
|
|
20604
20549
|
const organizationId = organization?.id || "";
|
|
20605
20550
|
const {
|
|
20606
20551
|
onChange: onSearchChange,
|
|
20607
20552
|
setVisibility: setSearchVisibility,
|
|
20608
20553
|
query: searchQuery
|
|
20609
20554
|
} = search;
|
|
20610
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20555
|
+
const [tableQuery, setTableQuery] = (0, import_react58.useState)(INITIAL_QUERY8);
|
|
20611
20556
|
const title = `Invoices | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20612
|
-
const computedQuery = (0,
|
|
20557
|
+
const computedQuery = (0, import_react58.useMemo)(() => {
|
|
20613
20558
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS4);
|
|
20614
20559
|
return {
|
|
20615
20560
|
...tempQuery,
|
|
@@ -20652,7 +20597,7 @@ function OrganizationInvoicesView() {
|
|
|
20652
20597
|
await fetchNextPage();
|
|
20653
20598
|
}
|
|
20654
20599
|
};
|
|
20655
|
-
(0,
|
|
20600
|
+
(0, import_react58.useEffect)(() => {
|
|
20656
20601
|
setSearchVisibility(true);
|
|
20657
20602
|
return () => {
|
|
20658
20603
|
onSearchChange("");
|
|
@@ -20695,8 +20640,8 @@ function OrganizationInvoicesView() {
|
|
|
20695
20640
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20696
20641
|
var import_apsara100 = require("@raystack/apsara");
|
|
20697
20642
|
|
|
20698
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20699
|
-
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";
|
|
20700
20645
|
var css70 = `._empty-state_1mf09_1 {
|
|
20701
20646
|
height: 100%;
|
|
20702
20647
|
}
|
|
@@ -20752,12 +20697,12 @@ var tokens_module_css_default = { "empty-state": "_empty-state_1mf09_1", "emptyS
|
|
|
20752
20697
|
|
|
20753
20698
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20754
20699
|
var import_icons7 = require("@raystack/apsara/icons");
|
|
20755
|
-
var
|
|
20700
|
+
var import_react59 = require("react");
|
|
20756
20701
|
var import_frontier48 = require("@raystack/proton/frontier");
|
|
20757
20702
|
var import_connect_query44 = require("@connectrpc/connect-query");
|
|
20758
20703
|
|
|
20759
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20760
|
-
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";
|
|
20761
20706
|
var css71 = `._empty-state_1mf09_1 {
|
|
20762
20707
|
height: 100%;
|
|
20763
20708
|
}
|
|
@@ -20932,16 +20877,16 @@ var ErrorState4 = () => {
|
|
|
20932
20877
|
};
|
|
20933
20878
|
function OrganizationTokensView() {
|
|
20934
20879
|
const t = useTerminology();
|
|
20935
|
-
const { organization, search } = (0,
|
|
20880
|
+
const { organization, search } = (0, import_react59.useContext)(OrganizationContext);
|
|
20936
20881
|
const organizationId = organization?.id || "";
|
|
20937
20882
|
const {
|
|
20938
20883
|
onChange: onSearchChange,
|
|
20939
20884
|
setVisibility: setSearchVisibility,
|
|
20940
20885
|
query: searchQuery
|
|
20941
20886
|
} = search;
|
|
20942
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20887
|
+
const [tableQuery, setTableQuery] = (0, import_react59.useState)(INITIAL_QUERY9);
|
|
20943
20888
|
const title = `Tokens | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20944
|
-
const computedQuery = (0,
|
|
20889
|
+
const computedQuery = (0, import_react59.useMemo)(() => {
|
|
20945
20890
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS5);
|
|
20946
20891
|
return {
|
|
20947
20892
|
...tempQuery,
|
|
@@ -20983,14 +20928,14 @@ function OrganizationTokensView() {
|
|
|
20983
20928
|
await fetchNextPage();
|
|
20984
20929
|
}
|
|
20985
20930
|
};
|
|
20986
|
-
(0,
|
|
20931
|
+
(0, import_react59.useEffect)(() => {
|
|
20987
20932
|
setSearchVisibility(true);
|
|
20988
20933
|
return () => {
|
|
20989
20934
|
onSearchChange("");
|
|
20990
20935
|
setSearchVisibility(false);
|
|
20991
20936
|
};
|
|
20992
20937
|
}, [setSearchVisibility, onSearchChange]);
|
|
20993
|
-
const columns = (0,
|
|
20938
|
+
const columns = (0, import_react59.useMemo)(() => getColumns16({ t }), [t]);
|
|
20994
20939
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_apsara100.Flex, { justify: "center", children: [
|
|
20995
20940
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(PageTitle, { title }),
|
|
20996
20941
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
@@ -21026,8 +20971,8 @@ function OrganizationTokensView() {
|
|
|
21026
20971
|
// admin/views/organizations/details/apis/index.tsx
|
|
21027
20972
|
var import_apsara103 = require("@raystack/apsara");
|
|
21028
20973
|
|
|
21029
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21030
|
-
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";
|
|
21031
20976
|
var css72 = `._empty-state_r9k2f_1 {
|
|
21032
20977
|
height: 100%;
|
|
21033
20978
|
}
|
|
@@ -21106,14 +21051,14 @@ var css72 = `._empty-state_r9k2f_1 {
|
|
|
21106
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" };
|
|
21107
21052
|
|
|
21108
21053
|
// admin/views/organizations/details/apis/index.tsx
|
|
21109
|
-
var
|
|
21054
|
+
var import_react61 = require("react");
|
|
21110
21055
|
|
|
21111
21056
|
// admin/views/organizations/details/apis/columns.tsx
|
|
21112
21057
|
var import_apsara101 = require("@raystack/apsara");
|
|
21113
21058
|
var import_dayjs16 = __toESM(require("dayjs"));
|
|
21114
21059
|
|
|
21115
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21116
|
-
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";
|
|
21117
21062
|
var css73 = `._empty-state_r9k2f_1 {
|
|
21118
21063
|
height: 100%;
|
|
21119
21064
|
}
|
|
@@ -21237,8 +21182,8 @@ function getColumns17(options) {
|
|
|
21237
21182
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21238
21183
|
var import_apsara102 = require("@raystack/apsara");
|
|
21239
21184
|
|
|
21240
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21241
|
-
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";
|
|
21242
21187
|
var css74 = `._empty-state_r9k2f_1 {
|
|
21243
21188
|
height: 100%;
|
|
21244
21189
|
}
|
|
@@ -21317,7 +21262,7 @@ var css74 = `._empty-state_r9k2f_1 {
|
|
|
21317
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" };
|
|
21318
21263
|
|
|
21319
21264
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21320
|
-
var
|
|
21265
|
+
var import_react60 = require("react");
|
|
21321
21266
|
var import_connect_query45 = require("@connectrpc/connect-query");
|
|
21322
21267
|
var import_frontier49 = require("@raystack/proton/frontier");
|
|
21323
21268
|
var import_protobuf29 = require("@bufbuild/protobuf");
|
|
@@ -21328,14 +21273,14 @@ var ServiceUserDetailsDialog = ({
|
|
|
21328
21273
|
}) => {
|
|
21329
21274
|
const t = useTerminology();
|
|
21330
21275
|
const { id = "", orgId = "", title = "" } = serviceUser || {};
|
|
21331
|
-
const projectsRequest = (0,
|
|
21276
|
+
const projectsRequest = (0, import_react60.useMemo)(
|
|
21332
21277
|
() => (0, import_protobuf29.create)(import_frontier49.ListServiceUserProjectsRequestSchema, {
|
|
21333
21278
|
orgId,
|
|
21334
21279
|
id
|
|
21335
21280
|
}),
|
|
21336
21281
|
[orgId, id]
|
|
21337
21282
|
);
|
|
21338
|
-
const tokensRequest = (0,
|
|
21283
|
+
const tokensRequest = (0, import_react60.useMemo)(
|
|
21339
21284
|
() => (0, import_protobuf29.create)(import_frontier49.ListServiceUserTokensRequestSchema, {
|
|
21340
21285
|
orgId,
|
|
21341
21286
|
id
|
|
@@ -21358,7 +21303,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21358
21303
|
enabled: !!orgId && !!id,
|
|
21359
21304
|
select: (data) => data?.tokens || []
|
|
21360
21305
|
});
|
|
21361
|
-
(0,
|
|
21306
|
+
(0, import_react60.useEffect)(() => {
|
|
21362
21307
|
if (projectError) {
|
|
21363
21308
|
import_apsara102.toast.error("Something went wrong", {
|
|
21364
21309
|
description: "Unable to fetch projects"
|
|
@@ -21372,7 +21317,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21372
21317
|
console.error("Unable to fetch tokens:", tokenError);
|
|
21373
21318
|
}
|
|
21374
21319
|
}, [projectError, tokenError]);
|
|
21375
|
-
const onOpenChange = (0,
|
|
21320
|
+
const onOpenChange = (0, import_react60.useCallback)(
|
|
21376
21321
|
(val) => {
|
|
21377
21322
|
if (!val) {
|
|
21378
21323
|
onClose();
|
|
@@ -21483,15 +21428,15 @@ var TRANSFORM_OPTIONS6 = {
|
|
|
21483
21428
|
};
|
|
21484
21429
|
function OrganizationApisView() {
|
|
21485
21430
|
const t = useTerminology();
|
|
21486
|
-
const { organization, search } = (0,
|
|
21431
|
+
const { organization, search } = (0, import_react61.useContext)(OrganizationContext);
|
|
21487
21432
|
const organizationId = organization?.id || "";
|
|
21488
21433
|
const {
|
|
21489
21434
|
onChange: onSearchChange,
|
|
21490
21435
|
setVisibility: setSearchVisibility,
|
|
21491
21436
|
query: searchQuery
|
|
21492
21437
|
} = search;
|
|
21493
|
-
const [tableQuery, setTableQuery] = (0,
|
|
21494
|
-
const computedQuery = (0,
|
|
21438
|
+
const [tableQuery, setTableQuery] = (0, import_react61.useState)(INITIAL_QUERY10);
|
|
21439
|
+
const computedQuery = (0, import_react61.useMemo)(() => {
|
|
21495
21440
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS6);
|
|
21496
21441
|
return {
|
|
21497
21442
|
...tempQuery,
|
|
@@ -21499,11 +21444,11 @@ function OrganizationApisView() {
|
|
|
21499
21444
|
};
|
|
21500
21445
|
}, [tableQuery, searchQuery]);
|
|
21501
21446
|
const [query] = useDebounceValue(computedQuery, 200);
|
|
21502
|
-
const [selectedServiceUser, setSelectedServiceUser] = (0,
|
|
21447
|
+
const [selectedServiceUser, setSelectedServiceUser] = (0, import_react61.useState)(
|
|
21503
21448
|
null
|
|
21504
21449
|
);
|
|
21505
21450
|
const title = `API | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
21506
|
-
(0,
|
|
21451
|
+
(0, import_react61.useEffect)(() => {
|
|
21507
21452
|
setSearchVisibility(true);
|
|
21508
21453
|
return () => {
|
|
21509
21454
|
onSearchChange("");
|
|
@@ -21549,10 +21494,10 @@ function OrganizationApisView() {
|
|
|
21549
21494
|
}
|
|
21550
21495
|
};
|
|
21551
21496
|
const loading = isLoading || isFetchingNextPage;
|
|
21552
|
-
const onDialogClose = (0,
|
|
21497
|
+
const onDialogClose = (0, import_react61.useCallback)(() => {
|
|
21553
21498
|
setSelectedServiceUser(null);
|
|
21554
21499
|
}, []);
|
|
21555
|
-
const onRowClick = (0,
|
|
21500
|
+
const onRowClick = (0, import_react61.useCallback)(
|
|
21556
21501
|
(row) => {
|
|
21557
21502
|
setSelectedServiceUser(row);
|
|
21558
21503
|
},
|
|
@@ -21561,7 +21506,7 @@ function OrganizationApisView() {
|
|
|
21561
21506
|
if (isError) {
|
|
21562
21507
|
console.error("ConnectRPC Error:", error);
|
|
21563
21508
|
}
|
|
21564
|
-
const columns = (0,
|
|
21509
|
+
const columns = (0, import_react61.useMemo)(
|
|
21565
21510
|
() => getColumns17({
|
|
21566
21511
|
groupCountMap: infiniteData ? getGroupCountMapFromFirstPage(infiniteData) : {},
|
|
21567
21512
|
t
|