@raystack/frontier 0.96.2 → 0.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/dist/index.js +560 -610
- package/admin/dist/index.mjs +468 -519
- package/hooks/dist/index.d.ts +14 -0
- package/hooks/dist/index.js +36 -2
- package/hooks/dist/index.mjs +36 -3
- package/package.json +3 -3
- package/react/dist/index.d.ts +38 -2
- package/react/dist/index.js +7644 -937
- package/react/dist/index.mjs +7925 -926
package/admin/dist/index.js
CHANGED
|
@@ -222,7 +222,7 @@ function isZeroUUID(uuid) {
|
|
|
222
222
|
function capitalizeFirstLetter(str) {
|
|
223
223
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function convertBillingAddressToString(address) {
|
|
226
226
|
if (!address)
|
|
227
227
|
return "";
|
|
228
228
|
const { line1, line2, city, state, country, postalCode } = address;
|
|
@@ -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-2338-92WyPC5HbCQ6/sdk/admin/views/roles/roles.module.css.js
|
|
236
|
+
var digest = "9c0e210830715e56d8087dafee2e4d13ca49f09040e4b022ddf2b063ab05bd8f";
|
|
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-2338-TmVNPbW39nHO/sdk/admin/components/page-header.module.css.js
|
|
322
|
+
var digest2 = "e3ae60b68d4013cf441317758e1d4538da4081adb59a7e89fdf437316f1dcef6";
|
|
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-2338-BCdJIXdhpMFO/sdk/admin/views/roles/roles.module.css.js
|
|
429
|
+
var digest3 = "abdeeb853dc96ceb602fc66a04029b13f29c736600bcfce9f13a903b106b0127";
|
|
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-2338-egUk6ZJl6NXL/sdk/admin/views/roles/roles.module.css.js
|
|
916
|
+
var digest4 = "5d90a39e83f0e7a77cd2deb4ac097ee31eb93a58fc3f77d84d05eaa971525e5d";
|
|
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-2338-TsWyg0gRkB7L/sdk/admin/views/invoices/invoices.module.css.js
|
|
1095
|
+
var digest5 = "e8487cbaccda8c27cd3e99d7c6ab290eb86df9588565f1e6f84949e626f15190";
|
|
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-2338-w5o5ayInZniR/sdk/admin/views/invoices/invoices.module.css.js
|
|
1214
|
+
var digest6 = "97e99c337aaeee0e8e1fb83093cb3902e3dc2fb3917f7df75bfadd1b0563acf7";
|
|
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-2338-d9Z31QTwMLtJ/sdk/admin/views/products/products.module.css.js
|
|
1761
|
+
var digest7 = "e565de662bdf4f54695938787caab248c727c434af428aa85e25dcaa67aca868";
|
|
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-2338-QrDPC8lhrbrx/sdk/admin/views/products/products.module.css.js
|
|
1833
|
+
var digest8 = "9b7b97e37917e603de20fa45224d9fd266b2ba491e2114ff92f840afc10b0e66";
|
|
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-2338-kPHeY9sGlr5u/sdk/admin/views/products/products.module.css.js
|
|
1886
|
+
var digest9 = "395c401443bb8e81aa3a8d3334558ac16384695945f61fc7614403e1951f00e3";
|
|
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-2338-wvHoG4LQOf1P/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2233
|
+
var digest10 = "8d9c65c143ad030a788899f8e84666db20327dd19040f0e239233856bb86719e";
|
|
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-2338-gW3ZvewwcUR8/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2450
|
+
var digest11 = "60e700567dd59809773615f23d9a476de4d90440ff20a6582c16d1b13ff629be";
|
|
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-2338-RHhEn3LybEow/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2561
|
+
var digest12 = "d60095a03213ad6c4c9f80eac15073d75c3fdeb35e74f2b2f06cc957568e1fb9";
|
|
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-2338-InS5V9xykrLt/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2825
|
+
var digest13 = "d8c9c17a80ea536d4d0d67ae14dbfd7ba82a478c57f6a13454ef4c26160bd209";
|
|
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-2338-k2t9J3gsrsSn/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2963
|
+
var digest14 = "579cfa05c120c1779171a2b8731b551ad0560b9f4727cf6c03a0d22fca44a7e2";
|
|
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-2338-Brop8Qgf9LPn/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3167
|
+
var digest15 = "af0994429e6269c29d77d7e2e77ae3c4aa213e625d4818e8a1012d3504111870";
|
|
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-2338-yp1imNojA2mR/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3309
|
+
var digest16 = "fd8fb0f11a27b9a8d74feaf4b8da418327c2dd5c13f5cc6344546066868dd4bf";
|
|
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,7 +3872,7 @@ var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
|
|
|
3872
3872
|
];
|
|
3873
3873
|
};
|
|
3874
3874
|
|
|
3875
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3875
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-OojQFO2Y5so5/sdk/admin/views/admins/admins.module.css.js
|
|
3876
3876
|
var digest17 = "5cd72e71043cbf53835fc5b3e7ee4bdaad1e4bae5b647fd8be2ea3b6fcb9c299";
|
|
3877
3877
|
var css17 = `._tableRoot_yd6a0_1 {
|
|
3878
3878
|
width: 100%;
|
|
@@ -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-2338-V29GE9fk1S06/sdk/admin/views/plans/plans.module.css.js
|
|
4034
|
+
var digest18 = "b8d4be3a23fb1d4751473c5bd686f7be6b2ca50e7ecbbfb3ebddb6ca568d3dca";
|
|
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-2338-myBTpU6GuxCA/sdk/admin/views/plans/plans.module.css.js
|
|
4088
|
+
var digest19 = "485639483dc5683f9f8dbfe4e0cb517bcdafb517a6c7cc2886c1800f38f0cc7c";
|
|
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-2338-vRKOquAmw9VI/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4239
|
+
var digest20 = "abf50093977fc80833214cc692048a3cdae4da3b0836a6a0a033bc912aae5a46";
|
|
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-2338-MyNWmxAhglx1/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4767
|
+
var digest21 = "c0c90fcc6e05da2c88de4595f4add098d3c69700d0a7be269deb7b801579fc95";
|
|
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-2338-RCQLVDkZTyoM/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4850
|
+
var digest22 = "bc50ba5a3954fc833dcb608363a864463a324fc12efdca3e136a908f4b1ad019";
|
|
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-2338-NqrvgTT9tFk8/sdk/admin/views/preferences/preferences.module.css.js
|
|
10439
|
+
var digest23 = "588deb8f99efba265021ae3120385b12330783dc405a541fccccac644bf97df7";
|
|
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-2338-H3jPBcDPBFOG/sdk/admin/views/preferences/preferences.module.css.js
|
|
10522
|
+
var digest24 = "a855ec43531ce53c8e9e9fa5a7cc3782b3ddbf70399d423d7e33d608696a5d12";
|
|
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-2338-HO3PZdp5UsjV/sdk/admin/views/users/list/list.module.css.js
|
|
10870
|
+
var digest25 = "ba34bce888c54646d3a24a6cb217494daacfd33d21c61c5749d8e8af8d6178d0";
|
|
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-2338-oYhR5v2VkHDn/sdk/admin/views/users/list/invite-users.module.css.js
|
|
10965
|
+
var digest26 = "bcf590e9078e751f3c31e8baef629d3f5784517183b15846c79e7295b5fe7572";
|
|
10966
10966
|
var css26 = `._invite-users-dialog-body_11ujx_1 {
|
|
10967
10967
|
display: flex;
|
|
10968
10968
|
flex-direction: column;
|
|
@@ -11000,6 +11000,37 @@ 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
|
+
case import_connect.Code.FailedPrecondition:
|
|
11026
|
+
handlers?.FailedPrecondition ? handlers.FailedPrecondition(connectError) : defaultHandler(connectError);
|
|
11027
|
+
break;
|
|
11028
|
+
default:
|
|
11029
|
+
defaultHandler(connectError);
|
|
11030
|
+
}
|
|
11031
|
+
}
|
|
11032
|
+
|
|
11033
|
+
// admin/views/users/list/invite-users.tsx
|
|
11003
11034
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
11004
11035
|
var inviteSchema = objectType({
|
|
11005
11036
|
role: stringType(),
|
|
@@ -11059,9 +11090,6 @@ var InviteUser = () => {
|
|
|
11059
11090
|
const { mutateAsync: inviteUser } = (0, import_connect_query13.useMutation)(
|
|
11060
11091
|
import_frontier16.FrontierServiceQueries.createOrganizationInvitation,
|
|
11061
11092
|
{
|
|
11062
|
-
onError: (error) => {
|
|
11063
|
-
console.error("Failed to invite user", error);
|
|
11064
|
-
},
|
|
11065
11093
|
onSuccess: (data) => {
|
|
11066
11094
|
const invitedCount = data?.invitations?.length ?? 0;
|
|
11067
11095
|
import_apsara44.toast.success(
|
|
@@ -11075,11 +11103,20 @@ var InviteUser = () => {
|
|
|
11075
11103
|
const onSubmit = async (data) => {
|
|
11076
11104
|
if (!data.organizationId)
|
|
11077
11105
|
return;
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11106
|
+
try {
|
|
11107
|
+
await inviteUser({
|
|
11108
|
+
orgId: data.organizationId,
|
|
11109
|
+
userIds: data?.emails,
|
|
11110
|
+
roleIds: data?.role ? [data?.role] : []
|
|
11111
|
+
});
|
|
11112
|
+
} catch (error) {
|
|
11113
|
+
handleConnectError(error, {
|
|
11114
|
+
AlreadyExists: () => import_apsara44.toast.error("Invitation already exists"),
|
|
11115
|
+
InvalidArgument: (err) => import_apsara44.toast.error("Invalid input", { description: err.message }),
|
|
11116
|
+
PermissionDenied: () => import_apsara44.toast.error("You don't have permission to perform this action"),
|
|
11117
|
+
Default: (err) => import_apsara44.toast.error("Something went wrong", { description: err.message })
|
|
11118
|
+
});
|
|
11119
|
+
}
|
|
11083
11120
|
};
|
|
11084
11121
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_apsara44.Dialog, { open, onOpenChange, children: [
|
|
11085
11122
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_apsara44.Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
@@ -11295,8 +11332,8 @@ var Navbar2 = ({ searchQuery, onExportUsers }) => {
|
|
|
11295
11332
|
};
|
|
11296
11333
|
var navbar_default2 = Navbar2;
|
|
11297
11334
|
|
|
11298
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11299
|
-
var digest27 = "
|
|
11335
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-2MkwHxqH9A0M/sdk/admin/views/users/list/list.module.css.js
|
|
11336
|
+
var digest27 = "e1947ca353297c565d09c03c0bee5b0f712ddc6207658379731d7f4166ad09dc";
|
|
11300
11337
|
var css27 = `._navbar_1s15g_1 {
|
|
11301
11338
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11302
11339
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11360,8 +11397,8 @@ var list_module_css_default2 = { "navbar": "_navbar_1s15g_1", "table": "_table_1
|
|
|
11360
11397
|
var import_apsara46 = require("@raystack/apsara");
|
|
11361
11398
|
var import_dayjs7 = __toESM(require("dayjs"));
|
|
11362
11399
|
|
|
11363
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11364
|
-
var digest28 = "
|
|
11400
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-1MyqRvTm8leN/sdk/admin/views/users/list/list.module.css.js
|
|
11401
|
+
var digest28 = "8227103e4e7fb707e17ca28975f0ad2dc464943c5d9d7a7c8147e390835df2a9";
|
|
11365
11402
|
var css28 = `._navbar_1s15g_1 {
|
|
11366
11403
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11367
11404
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11644,7 +11681,7 @@ var UsersList = ({ onExportUsers, onNavigateToUser }) => {
|
|
|
11644
11681
|
var import_apsara62 = require("@raystack/apsara");
|
|
11645
11682
|
|
|
11646
11683
|
// admin/views/users/details/layout/layout.tsx
|
|
11647
|
-
var
|
|
11684
|
+
var import_react25 = require("react");
|
|
11648
11685
|
var import_apsara55 = require("@raystack/apsara");
|
|
11649
11686
|
|
|
11650
11687
|
// admin/views/users/details/layout/side-panel.tsx
|
|
@@ -11653,8 +11690,8 @@ var import_apsara53 = require("@raystack/apsara");
|
|
|
11653
11690
|
// admin/views/users/details/layout/side-panel-details.tsx
|
|
11654
11691
|
var import_apsara48 = require("@raystack/apsara");
|
|
11655
11692
|
|
|
11656
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11657
|
-
var digest29 = "
|
|
11693
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-z2xIrmwQgosM/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11694
|
+
var digest29 = "89a11fed0bca0b8550a4ef3029e59971b52f7645acf684cf0192773273de10ee";
|
|
11658
11695
|
var css29 = `._side-panel_1oc3f_1 {
|
|
11659
11696
|
transform: all 0.3s ease-in-out;
|
|
11660
11697
|
padding-bottom: 80px;
|
|
@@ -11761,8 +11798,8 @@ var SidePanelDetails2 = () => {
|
|
|
11761
11798
|
var import_apsara52 = require("@raystack/apsara");
|
|
11762
11799
|
var import_dayjs8 = __toESM(require("dayjs"));
|
|
11763
11800
|
|
|
11764
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11765
|
-
var digest30 = "
|
|
11801
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-dwKrpzsXyX5p/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11802
|
+
var digest30 = "42ff69e694794e623d8a910c10b41cc07678f975af0340c88c6042c2c2d1dd79";
|
|
11766
11803
|
var css30 = `._side-panel_1oc3f_1 {
|
|
11767
11804
|
transform: all 0.3s ease-in-out;
|
|
11768
11805
|
padding-bottom: 80px;
|
|
@@ -11825,8 +11862,8 @@ var side_panel_module_css_default2 = { "side-panel": "_side-panel_1oc3f_1", "sid
|
|
|
11825
11862
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
11826
11863
|
var import_apsara51 = require("@raystack/apsara");
|
|
11827
11864
|
|
|
11828
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11829
|
-
var digest31 = "
|
|
11865
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-phX6RsCx2FBf/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11866
|
+
var digest31 = "1c744dc3b4135f60b7a06be253e3b4b161e0173a95ef9bd869676b6a7db97116";
|
|
11830
11867
|
var css31 = `._side-panel_1oc3f_1 {
|
|
11831
11868
|
transform: all 0.3s ease-in-out;
|
|
11832
11869
|
padding-bottom: 80px;
|
|
@@ -11887,25 +11924,21 @@ var css31 = `._side-panel_1oc3f_1 {
|
|
|
11887
11924
|
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
11925
|
|
|
11889
11926
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
11890
|
-
var
|
|
11927
|
+
var import_react24 = require("react");
|
|
11891
11928
|
var import_frontier19 = require("@raystack/proton/frontier");
|
|
11892
11929
|
var import_protobuf8 = require("@bufbuild/protobuf");
|
|
11893
11930
|
var import_connect_query16 = require("@connectrpc/connect-query");
|
|
11894
11931
|
|
|
11895
11932
|
// admin/components/AssignRole.tsx
|
|
11896
11933
|
var import_apsara49 = require("@raystack/apsara");
|
|
11897
|
-
var import_react23 = require("react");
|
|
11898
11934
|
var import_frontier18 = require("@raystack/proton/frontier");
|
|
11899
11935
|
var import_protobuf7 = require("@bufbuild/protobuf");
|
|
11900
11936
|
var import_connect_query15 = require("@connectrpc/connect-query");
|
|
11901
|
-
var import_connect = require("@connectrpc/connect");
|
|
11902
11937
|
var import_react_hook_form5 = require("react-hook-form");
|
|
11903
11938
|
var import_zod4 = require("@hookform/resolvers/zod");
|
|
11904
11939
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
11905
11940
|
var formSchema = external_exports.object({
|
|
11906
|
-
|
|
11907
|
-
message: "At least one role must be selected"
|
|
11908
|
-
})
|
|
11941
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
11909
11942
|
});
|
|
11910
11943
|
var AssignRole = ({
|
|
11911
11944
|
roles = [],
|
|
@@ -11914,80 +11947,38 @@ var AssignRole = ({
|
|
|
11914
11947
|
onRoleUpdate,
|
|
11915
11948
|
onClose
|
|
11916
11949
|
}) => {
|
|
11917
|
-
const
|
|
11950
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
11918
11951
|
const {
|
|
11919
11952
|
handleSubmit,
|
|
11920
11953
|
watch,
|
|
11921
11954
|
setValue,
|
|
11922
|
-
formState: { isSubmitting, errors }
|
|
11955
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
11923
11956
|
} = (0, import_react_hook_form5.useForm)({
|
|
11924
11957
|
defaultValues: {
|
|
11925
|
-
|
|
11958
|
+
roleId: currentRoleId
|
|
11926
11959
|
},
|
|
11927
11960
|
resolver: (0, import_zod4.zodResolver)(formSchema)
|
|
11928
11961
|
});
|
|
11929
|
-
const { mutateAsync:
|
|
11930
|
-
import_frontier18.FrontierServiceQueries.
|
|
11931
|
-
);
|
|
11932
|
-
const { mutateAsync: createPolicy } = (0, import_connect_query15.useMutation)(
|
|
11933
|
-
import_frontier18.FrontierServiceQueries.createPolicy
|
|
11962
|
+
const { mutateAsync: setMemberRole } = (0, import_connect_query15.useMutation)(
|
|
11963
|
+
import_frontier18.FrontierServiceQueries.setOrganizationMemberRole
|
|
11934
11964
|
);
|
|
11935
|
-
const
|
|
11965
|
+
const selectedRoleId = watch("roleId");
|
|
11936
11966
|
function onCheckedChange(value, roleId) {
|
|
11937
11967
|
if (!roleId)
|
|
11938
11968
|
return;
|
|
11939
|
-
const currentRoles = new Set(roleIds);
|
|
11940
11969
|
if (value) {
|
|
11941
|
-
|
|
11942
|
-
} else {
|
|
11943
|
-
currentRoles.delete(roleId);
|
|
11970
|
+
setValue("roleId", roleId, { shouldDirty: true });
|
|
11944
11971
|
}
|
|
11945
|
-
setValue("roleIds", currentRoles);
|
|
11946
11972
|
}
|
|
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
11973
|
const onSubmit = async (data) => {
|
|
11956
11974
|
try {
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
(0, import_protobuf7.create)(import_frontier18.ListPoliciesRequestSchema, {
|
|
11975
|
+
await setMemberRole(
|
|
11976
|
+
(0, import_protobuf7.create)(import_frontier18.SetOrganizationMemberRoleRequestSchema, {
|
|
11960
11977
|
orgId: organizationId,
|
|
11961
|
-
userId: user?.id
|
|
11978
|
+
userId: user?.id,
|
|
11979
|
+
roleId: data.roleId
|
|
11962
11980
|
})
|
|
11963
11981
|
);
|
|
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
11982
|
if (onRoleUpdate) {
|
|
11992
11983
|
onRoleUpdate();
|
|
11993
11984
|
}
|
|
@@ -12008,7 +11999,7 @@ var AssignRole = ({
|
|
|
12008
11999
|
/* @__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
12000
|
roles.map((role) => {
|
|
12010
12001
|
const htmlId = `role-${role.id}`;
|
|
12011
|
-
const checked =
|
|
12002
|
+
const checked = selectedRoleId === role.id;
|
|
12012
12003
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_apsara49.Flex, { gap: 3, children: [
|
|
12013
12004
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
12014
12005
|
import_apsara49.Checkbox,
|
|
@@ -12022,7 +12013,7 @@ var AssignRole = ({
|
|
|
12022
12013
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_apsara49.Label, { htmlFor: htmlId, children: role.title })
|
|
12023
12014
|
] }, role.id);
|
|
12024
12015
|
}),
|
|
12025
|
-
errors.
|
|
12016
|
+
errors.roleId && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_apsara49.Text, { variant: "danger", children: errors.roleId.message })
|
|
12026
12017
|
] }) })
|
|
12027
12018
|
] }) }),
|
|
12028
12019
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_apsara49.Dialog.Footer, { children: [
|
|
@@ -12040,6 +12031,7 @@ var AssignRole = ({
|
|
|
12040
12031
|
import_apsara49.Button,
|
|
12041
12032
|
{
|
|
12042
12033
|
type: "submit",
|
|
12034
|
+
disabled: !isDirty2,
|
|
12043
12035
|
"data-test-id": "assign-role-update-button",
|
|
12044
12036
|
loading: isSubmitting,
|
|
12045
12037
|
loaderText: "Updating...",
|
|
@@ -12052,7 +12044,7 @@ var AssignRole = ({
|
|
|
12052
12044
|
};
|
|
12053
12045
|
|
|
12054
12046
|
// admin/views/users/details/layout/suspend-user.tsx
|
|
12055
|
-
var
|
|
12047
|
+
var import_react23 = require("react");
|
|
12056
12048
|
var import_apsara50 = require("@raystack/apsara");
|
|
12057
12049
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
12058
12050
|
var SuspendUser = ({
|
|
@@ -12061,7 +12053,7 @@ var SuspendUser = ({
|
|
|
12061
12053
|
onSubmit
|
|
12062
12054
|
}) => {
|
|
12063
12055
|
const t = useTerminology();
|
|
12064
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
12056
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react23.useState)(false);
|
|
12065
12057
|
const handleSuspend = async () => {
|
|
12066
12058
|
try {
|
|
12067
12059
|
setIsSubmitting(true);
|
|
@@ -12119,8 +12111,8 @@ var MembershipDropdown = ({
|
|
|
12119
12111
|
data,
|
|
12120
12112
|
onReset
|
|
12121
12113
|
}) => {
|
|
12122
|
-
const [isAssignRoleDialogOpen, setIsAssignRoleDialogOpen] = (0,
|
|
12123
|
-
const [isSuspendDialogOpen, setIsSuspendDialogOpen] = (0,
|
|
12114
|
+
const [isAssignRoleDialogOpen, setIsAssignRoleDialogOpen] = (0, import_react24.useState)(false);
|
|
12115
|
+
const [isSuspendDialogOpen, setIsSuspendDialogOpen] = (0, import_react24.useState)(false);
|
|
12124
12116
|
const { user } = useUser();
|
|
12125
12117
|
const { data: defaultRoles = [], isLoading: isDefaultRolesLoading, error: defaultRolesError } = (0, import_connect_query16.useQuery)(
|
|
12126
12118
|
import_frontier19.FrontierServiceQueries.listRoles,
|
|
@@ -12146,7 +12138,7 @@ var MembershipDropdown = ({
|
|
|
12146
12138
|
if (orgRolesError) {
|
|
12147
12139
|
console.error("Failed to fetch organization roles:", orgRolesError);
|
|
12148
12140
|
}
|
|
12149
|
-
const roles = (0,
|
|
12141
|
+
const roles = (0, import_react24.useMemo)(
|
|
12150
12142
|
() => [...defaultRoles, ...organizationRoles],
|
|
12151
12143
|
[defaultRoles, organizationRoles]
|
|
12152
12144
|
);
|
|
@@ -12165,7 +12157,7 @@ var MembershipDropdown = ({
|
|
|
12165
12157
|
toggleSuspendDialog();
|
|
12166
12158
|
onReset?.();
|
|
12167
12159
|
};
|
|
12168
|
-
const memoizedUser = (0,
|
|
12160
|
+
const memoizedUser = (0, import_react24.useMemo)(
|
|
12169
12161
|
() => (0, import_protobuf8.create)(
|
|
12170
12162
|
import_frontier19.SearchOrganizationUsersResponse_OrganizationUserSchema,
|
|
12171
12163
|
Object.assign(user ?? {}, {
|
|
@@ -12264,8 +12256,8 @@ var SidePanelMembership = ({
|
|
|
12264
12256
|
] });
|
|
12265
12257
|
};
|
|
12266
12258
|
|
|
12267
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12268
|
-
var digest32 = "
|
|
12259
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-LxTTpacq6v2c/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
12260
|
+
var digest32 = "220aecf45685989abf247c5ae8554cac6d047136e836459484f08110704d768f";
|
|
12269
12261
|
var css32 = `._side-panel_1oc3f_1 {
|
|
12270
12262
|
transform: all 0.3s ease-in-out;
|
|
12271
12263
|
padding-bottom: 80px;
|
|
@@ -12383,8 +12375,8 @@ var UserDetailsSidePanel = () => {
|
|
|
12383
12375
|
);
|
|
12384
12376
|
};
|
|
12385
12377
|
|
|
12386
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12387
|
-
var digest33 = "
|
|
12378
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-PXUGuhcZo7eI/sdk/admin/views/users/details/layout/layout.module.css.js
|
|
12379
|
+
var digest33 = "42122a88664ac68a7bf2d1fc49a383784578d5cb58dede7e3ad442d9724252ed";
|
|
12388
12380
|
var css33 = `._page_190wz_1 {
|
|
12389
12381
|
height: 100vh;
|
|
12390
12382
|
width: 100%;
|
|
@@ -12418,8 +12410,8 @@ var layout_module_css_default = { "page": "_page_190wz_1", "main_content": "_mai
|
|
|
12418
12410
|
var import_apsara54 = require("@raystack/apsara");
|
|
12419
12411
|
var import_icons = require("@raystack/apsara/icons");
|
|
12420
12412
|
|
|
12421
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12422
|
-
var digest34 = "
|
|
12413
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-roZgt86UaOTf/sdk/admin/views/users/details/layout/navbar.module.css.js
|
|
12414
|
+
var digest34 = "4c51b7e6906763f113308a4212dda1b1506b33266adab2530d3d235c14fdcff6";
|
|
12423
12415
|
var css34 = `._navbar_1ahsl_1 {
|
|
12424
12416
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
12425
12417
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -12518,7 +12510,7 @@ var UserDetailsNavbar = ({
|
|
|
12518
12510
|
// admin/views/users/details/layout/layout.tsx
|
|
12519
12511
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
12520
12512
|
var UserDetailsLayout = ({ children, currentPath, onNavigate }) => {
|
|
12521
|
-
const [showSidePanel, setShowSidePanel] = (0,
|
|
12513
|
+
const [showSidePanel, setShowSidePanel] = (0, import_react25.useState)(true);
|
|
12522
12514
|
function toggleSidePanel() {
|
|
12523
12515
|
setShowSidePanel(!showSidePanel);
|
|
12524
12516
|
}
|
|
@@ -12545,7 +12537,7 @@ var import_frontier23 = require("@raystack/proton/frontier");
|
|
|
12545
12537
|
var import_apsara61 = require("@raystack/apsara");
|
|
12546
12538
|
|
|
12547
12539
|
// admin/views/users/details/security/block-user.tsx
|
|
12548
|
-
var
|
|
12540
|
+
var import_react26 = require("react");
|
|
12549
12541
|
var import_apsara56 = require("@raystack/apsara");
|
|
12550
12542
|
var import_connect_query18 = require("@connectrpc/connect-query");
|
|
12551
12543
|
var import_frontier21 = require("@raystack/proton/frontier");
|
|
@@ -12553,13 +12545,13 @@ var import_react_query6 = require("@tanstack/react-query");
|
|
|
12553
12545
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
12554
12546
|
var BlockUserDialog = () => {
|
|
12555
12547
|
const t = useTerminology();
|
|
12556
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
12548
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react26.useState)(false);
|
|
12557
12549
|
const { user, reset } = useUser();
|
|
12558
12550
|
const queryClient = (0, import_react_query6.useQueryClient)();
|
|
12559
12551
|
const transport = (0, import_connect_query18.useTransport)();
|
|
12560
12552
|
const isActive = user?.state === "enabled";
|
|
12561
12553
|
const userName = getUserName(user);
|
|
12562
|
-
const optimisticUpdateState = (0,
|
|
12554
|
+
const optimisticUpdateState = (0, import_react26.useCallback)(
|
|
12563
12555
|
(state) => {
|
|
12564
12556
|
queryClient.setQueryData(
|
|
12565
12557
|
(0, import_connect_query18.createConnectQueryKey)({
|
|
@@ -12590,9 +12582,6 @@ var BlockUserDialog = () => {
|
|
|
12590
12582
|
optimisticUpdateState("disabled");
|
|
12591
12583
|
reset?.();
|
|
12592
12584
|
onOpenChange(false);
|
|
12593
|
-
},
|
|
12594
|
-
onError: (error) => {
|
|
12595
|
-
console.error("Failed to block user", error);
|
|
12596
12585
|
}
|
|
12597
12586
|
}
|
|
12598
12587
|
);
|
|
@@ -12604,9 +12593,6 @@ var BlockUserDialog = () => {
|
|
|
12604
12593
|
optimisticUpdateState("enabled");
|
|
12605
12594
|
reset?.();
|
|
12606
12595
|
onOpenChange(false);
|
|
12607
|
-
},
|
|
12608
|
-
onError: (error) => {
|
|
12609
|
-
console.error("Failed to block user", error);
|
|
12610
12596
|
}
|
|
12611
12597
|
}
|
|
12612
12598
|
);
|
|
@@ -12614,8 +12600,19 @@ var BlockUserDialog = () => {
|
|
|
12614
12600
|
const onOpenChange = (value) => {
|
|
12615
12601
|
setIsDialogOpen(value);
|
|
12616
12602
|
};
|
|
12603
|
+
const handleAction = async (action, errorMessage) => {
|
|
12604
|
+
try {
|
|
12605
|
+
await action({ id: user?.id || "" });
|
|
12606
|
+
} catch (error) {
|
|
12607
|
+
handleConnectError(error, {
|
|
12608
|
+
PermissionDenied: () => import_apsara56.toast.error("You don't have permission to perform this action"),
|
|
12609
|
+
NotFound: (err) => import_apsara56.toast.error("Not found", { description: err.message }),
|
|
12610
|
+
Default: (err) => import_apsara56.toast.error(errorMessage, { description: err.message })
|
|
12611
|
+
});
|
|
12612
|
+
}
|
|
12613
|
+
};
|
|
12617
12614
|
const config = isActive ? {
|
|
12618
|
-
onClick: blockUser,
|
|
12615
|
+
onClick: () => handleAction(blockUser, `Failed to block ${t.user({ case: "lower" })}`),
|
|
12619
12616
|
btnColor: "danger",
|
|
12620
12617
|
btnText: "Block",
|
|
12621
12618
|
dialogTitle: `Block ${t.user({ case: "lower" })}`,
|
|
@@ -12623,7 +12620,7 @@ var BlockUserDialog = () => {
|
|
|
12623
12620
|
dialogConfirmText: "Block",
|
|
12624
12621
|
dialogConfirmLoadingText: "Blocking..."
|
|
12625
12622
|
} : {
|
|
12626
|
-
onClick: unblockUser,
|
|
12623
|
+
onClick: () => handleAction(unblockUser, `Failed to unblock ${t.user({ case: "lower" })}`),
|
|
12627
12624
|
btnColor: "accent",
|
|
12628
12625
|
btnText: "Unblock",
|
|
12629
12626
|
dialogTitle: `Unblock ${t.user({ case: "lower" })}`,
|
|
@@ -12667,7 +12664,7 @@ var BlockUserDialog = () => {
|
|
|
12667
12664
|
"data-test-id": "admin-security-block-user-submit",
|
|
12668
12665
|
loading: isSubmitting,
|
|
12669
12666
|
loaderText: config.dialogConfirmLoadingText,
|
|
12670
|
-
onClick:
|
|
12667
|
+
onClick: config.onClick,
|
|
12671
12668
|
children: config.dialogConfirmText
|
|
12672
12669
|
}
|
|
12673
12670
|
)
|
|
@@ -12677,18 +12674,18 @@ var BlockUserDialog = () => {
|
|
|
12677
12674
|
};
|
|
12678
12675
|
|
|
12679
12676
|
// admin/views/users/details/security/sessions/index.tsx
|
|
12680
|
-
var
|
|
12677
|
+
var import_react28 = require("react");
|
|
12681
12678
|
var import_apsara60 = require("@raystack/apsara");
|
|
12682
12679
|
|
|
12683
12680
|
// admin/views/users/details/security/sessions/revoke-session-confirm.tsx
|
|
12684
|
-
var
|
|
12681
|
+
var import_react27 = require("react");
|
|
12685
12682
|
var import_apsara58 = require("@raystack/apsara");
|
|
12686
12683
|
|
|
12687
12684
|
// admin/views/users/details/security/sessions/revoke-session-final-confirm.tsx
|
|
12688
12685
|
var import_apsara57 = require("@raystack/apsara");
|
|
12689
12686
|
|
|
12690
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12691
|
-
var digest35 = "
|
|
12687
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-vECHgnWWw85I/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12688
|
+
var digest35 = "05adfc3299a820f87d525b744a395cc47f9f79dff2b03013018061246b87fd47";
|
|
12692
12689
|
var css35 = `._sessionsContainer_aq82p_1 {
|
|
12693
12690
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12694
12691
|
border-radius: var(--rs-radius-2);
|
|
@@ -12809,8 +12806,8 @@ var RevokeSessionFinalConfirm = ({
|
|
|
12809
12806
|
) });
|
|
12810
12807
|
};
|
|
12811
12808
|
|
|
12812
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12813
|
-
var digest36 = "
|
|
12809
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-K8UPxR3kQVW2/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12810
|
+
var digest36 = "cb52303dbe46babbecb48756fb773324a60f10a1ed2f1b652c0ac7f76628f0b1";
|
|
12814
12811
|
var css36 = `._sessionsContainer_aq82p_1 {
|
|
12815
12812
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12816
12813
|
border-radius: var(--rs-radius-2);
|
|
@@ -12875,7 +12872,7 @@ var sessions_module_css_default2 = { "sessionsContainer": "_sessionsContainer_aq
|
|
|
12875
12872
|
// admin/views/users/details/security/sessions/revoke-session-confirm.tsx
|
|
12876
12873
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
12877
12874
|
var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm, isLoading = false }) => {
|
|
12878
|
-
const [isFinalConfirmOpen, setIsFinalConfirmOpen] = (0,
|
|
12875
|
+
const [isFinalConfirmOpen, setIsFinalConfirmOpen] = (0, import_react27.useState)(false);
|
|
12879
12876
|
const handleRevoke = () => {
|
|
12880
12877
|
setIsFinalConfirmOpen(true);
|
|
12881
12878
|
};
|
|
@@ -12954,8 +12951,8 @@ var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm
|
|
|
12954
12951
|
// admin/views/users/details/security/sessions/session-skeleton.tsx
|
|
12955
12952
|
var import_apsara59 = require("@raystack/apsara");
|
|
12956
12953
|
|
|
12957
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12958
|
-
var digest37 = "
|
|
12954
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-U6M5WvRlq4Ty/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12955
|
+
var digest37 = "5c58245ed37080f76542d413607ce26224b19173a1fdfb3c99cb00a7b78c0870";
|
|
12959
12956
|
var css37 = `._sessionsContainer_aq82p_1 {
|
|
12960
12957
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12961
12958
|
border-radius: var(--rs-radius-2);
|
|
@@ -13036,8 +13033,8 @@ var import_frontier22 = require("@raystack/proton/frontier");
|
|
|
13036
13033
|
var import_dayjs9 = __toESM(require("dayjs"));
|
|
13037
13034
|
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
|
13038
13035
|
|
|
13039
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13040
|
-
var digest38 = "
|
|
13036
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-1YSinqB5z9fj/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
13037
|
+
var digest38 = "d65e9a0907613d0ef2839e8bce16825739cbe8fdd71ba41e3e810092c506c9d9";
|
|
13041
13038
|
var css38 = `._sessionsContainer_aq82p_1 {
|
|
13042
13039
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
13043
13040
|
border-radius: var(--rs-radius-2);
|
|
@@ -13133,8 +13130,8 @@ var UserSessions = () => {
|
|
|
13133
13130
|
const { user } = useUser();
|
|
13134
13131
|
const queryClient = (0, import_react_query7.useQueryClient)();
|
|
13135
13132
|
const transport = (0, import_connect_query19.useTransport)();
|
|
13136
|
-
const [isRevokeDialogOpen, setIsRevokeDialogOpen] = (0,
|
|
13137
|
-
const [selectedSession, setSelectedSession] = (0,
|
|
13133
|
+
const [isRevokeDialogOpen, setIsRevokeDialogOpen] = (0, import_react28.useState)(false);
|
|
13134
|
+
const [selectedSession, setSelectedSession] = (0, import_react28.useState)(null);
|
|
13138
13135
|
const {
|
|
13139
13136
|
data: sessionsData,
|
|
13140
13137
|
isLoading,
|
|
@@ -13246,8 +13243,8 @@ var UserSessions = () => {
|
|
|
13246
13243
|
] });
|
|
13247
13244
|
};
|
|
13248
13245
|
|
|
13249
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13250
|
-
var digest39 = "
|
|
13246
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-77W4lgLMnPIH/sdk/admin/views/users/details/security/security.module.css.js
|
|
13247
|
+
var digest39 = "219ec54a2945b27b65d9b63d14012c96988b856af9ae0f3133963a81c7a08beb";
|
|
13251
13248
|
var css39 = `._container_4259p_1 {
|
|
13252
13249
|
width: 100%;
|
|
13253
13250
|
}
|
|
@@ -13367,14 +13364,14 @@ function UsersView({
|
|
|
13367
13364
|
// admin/views/organizations/list/index.tsx
|
|
13368
13365
|
var import_apsara67 = require("@raystack/apsara");
|
|
13369
13366
|
var import_icons3 = require("@raystack/apsara/icons");
|
|
13370
|
-
var
|
|
13367
|
+
var import_react32 = require("react");
|
|
13371
13368
|
|
|
13372
13369
|
// admin/views/organizations/list/navbar.tsx
|
|
13373
13370
|
var import_apsara63 = require("@raystack/apsara");
|
|
13374
13371
|
var import_icons2 = require("@raystack/apsara/icons");
|
|
13375
13372
|
|
|
13376
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13377
|
-
var digest40 = "
|
|
13373
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-nBapWLXa7II4/sdk/admin/views/organizations/list/list.module.css.js
|
|
13374
|
+
var digest40 = "b8558c282a8f2ea3f808341e73b442782434a89572f609de84dc78de08acf48a";
|
|
13378
13375
|
var css40 = `._navbar_1py96_1 {
|
|
13379
13376
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13380
13377
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13479,7 +13476,7 @@ var css40 = `._navbar_1py96_1 {
|
|
|
13479
13476
|
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
13477
|
|
|
13481
13478
|
// admin/views/organizations/list/navbar.tsx
|
|
13482
|
-
var
|
|
13479
|
+
var import_react29 = require("react");
|
|
13483
13480
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
13484
13481
|
var OrganizationsNavabar = ({
|
|
13485
13482
|
searchQuery,
|
|
@@ -13487,8 +13484,8 @@ var OrganizationsNavabar = ({
|
|
|
13487
13484
|
onExportCsv
|
|
13488
13485
|
}) => {
|
|
13489
13486
|
const t = useTerminology();
|
|
13490
|
-
const [showSearch, setShowSearch] = (0,
|
|
13491
|
-
const [isDownloading, setIsDownloading] = (0,
|
|
13487
|
+
const [showSearch, setShowSearch] = (0, import_react29.useState)(searchQuery ? true : false);
|
|
13488
|
+
const [isDownloading, setIsDownloading] = (0, import_react29.useState)(false);
|
|
13492
13489
|
function toggleSearch() {
|
|
13493
13490
|
setShowSearch((prev) => !prev);
|
|
13494
13491
|
}
|
|
@@ -13563,8 +13560,8 @@ var OrganizationsNavabar = ({
|
|
|
13563
13560
|
] });
|
|
13564
13561
|
};
|
|
13565
13562
|
|
|
13566
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13567
|
-
var digest41 = "
|
|
13563
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-CnYXupDf7yrk/sdk/admin/views/organizations/list/list.module.css.js
|
|
13564
|
+
var digest41 = "3a74823e06b1b48caf4d7bb8967f2841ae3a06e78c18643de3acf3d44945a920";
|
|
13568
13565
|
var css41 = `._navbar_1py96_1 {
|
|
13569
13566
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13570
13567
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13672,8 +13669,8 @@ var list_module_css_default5 = { "navbar": "_navbar_1py96_1", "table": "_table_1
|
|
|
13672
13669
|
var import_apsara64 = require("@raystack/apsara");
|
|
13673
13670
|
var import_dayjs10 = __toESM(require("dayjs"));
|
|
13674
13671
|
|
|
13675
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13676
|
-
var digest42 = "
|
|
13672
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-BMDwHmD23S74/sdk/admin/views/organizations/list/list.module.css.js
|
|
13673
|
+
var digest42 = "794e97cabbc6d687542f47fede293345959196c807f963401fdc60529f18da4f";
|
|
13677
13674
|
var css42 = `._navbar_1py96_1 {
|
|
13678
13675
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13679
13676
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13937,10 +13934,10 @@ var import_frontier25 = require("@raystack/proton/frontier");
|
|
|
13937
13934
|
var import_protobuf9 = require("@bufbuild/protobuf");
|
|
13938
13935
|
|
|
13939
13936
|
// admin/views/organizations/list/create.tsx
|
|
13940
|
-
var
|
|
13937
|
+
var import_react31 = require("react");
|
|
13941
13938
|
|
|
13942
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13943
|
-
var digest43 = "
|
|
13939
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-kuffxmPJ79Dn/sdk/admin/views/organizations/list/list.module.css.js
|
|
13940
|
+
var digest43 = "b9104a4937f9d1b8ca5d191fbdd47b952662216de6851e6806a84e20bb79433d";
|
|
13944
13941
|
var css43 = `._navbar_1py96_1 {
|
|
13945
13942
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13946
13943
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -14049,7 +14046,7 @@ var import_apsara66 = require("@raystack/apsara");
|
|
|
14049
14046
|
|
|
14050
14047
|
// react/components/avatar-upload/index.tsx
|
|
14051
14048
|
var import_react_image_crop = __toESM(require("react-image-crop"));
|
|
14052
|
-
var
|
|
14049
|
+
var import_react30 = __toESM(require("react"));
|
|
14053
14050
|
var import_apsara65 = require("@raystack/apsara");
|
|
14054
14051
|
|
|
14055
14052
|
// react/assets/cross.svg
|
|
@@ -14058,8 +14055,8 @@ var cross_default = 'data:image/svg+xml,<svg width="20" height="20" viewBox="0 0
|
|
|
14058
14055
|
// react/components/avatar-upload/index.tsx
|
|
14059
14056
|
var import_ReactCrop = require("react-image-crop/dist/ReactCrop.css");
|
|
14060
14057
|
|
|
14061
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14062
|
-
var digest44 = "
|
|
14058
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-jSuCMyVcIiLZ/sdk/react/components/avatar-upload/avatar-upload.module.css.js
|
|
14059
|
+
var digest44 = "01f26b6490250cf815bd4738dec12f93b93916a3c5e7ef48f9aaed2a2f58a7e2";
|
|
14063
14060
|
var css44 = `._container_1k4dc_1 {
|
|
14064
14061
|
display: flex;
|
|
14065
14062
|
flex-direction: column;
|
|
@@ -14137,8 +14134,8 @@ var avatar_upload_module_css_default = { "container": "_container_1k4dc_1", "upl
|
|
|
14137
14134
|
// react/components/avatar-upload/index.tsx
|
|
14138
14135
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
14139
14136
|
function CropModal({ onClose, imgSrc, onSave }) {
|
|
14140
|
-
const [crop, setCrop] = (0,
|
|
14141
|
-
const imgRef = (0,
|
|
14137
|
+
const [crop, setCrop] = (0, import_react30.useState)();
|
|
14138
|
+
const imgRef = (0, import_react30.useRef)(null);
|
|
14142
14139
|
async function handleSave() {
|
|
14143
14140
|
const image = imgRef.current;
|
|
14144
14141
|
if (!image) {
|
|
@@ -14264,13 +14261,13 @@ function CropModal({ onClose, imgSrc, onSave }) {
|
|
|
14264
14261
|
}
|
|
14265
14262
|
) });
|
|
14266
14263
|
}
|
|
14267
|
-
var AvatarUpload =
|
|
14264
|
+
var AvatarUpload = import_react30.default.forwardRef(
|
|
14268
14265
|
({ subText, value, onChange = () => {
|
|
14269
14266
|
}, initials = "", disabled = false }, forwardedRef) => {
|
|
14270
|
-
const inputRef = (0,
|
|
14271
|
-
const [imgSrc, setImgSrc] = (0,
|
|
14272
|
-
const [showCropModal, setShowCropModal] = (0,
|
|
14273
|
-
const [isHover, setIsHover] = (0,
|
|
14267
|
+
const inputRef = (0, import_react30.useRef)(null);
|
|
14268
|
+
const [imgSrc, setImgSrc] = (0, import_react30.useState)("");
|
|
14269
|
+
const [showCropModal, setShowCropModal] = (0, import_react30.useState)(false);
|
|
14270
|
+
const [isHover, setIsHover] = (0, import_react30.useState)(false);
|
|
14274
14271
|
function onUploadIconClick() {
|
|
14275
14272
|
const inputField = inputRef.current;
|
|
14276
14273
|
inputField?.click();
|
|
@@ -14355,9 +14352,9 @@ function CreateOrganizationPanel({
|
|
|
14355
14352
|
onSuccess
|
|
14356
14353
|
}) {
|
|
14357
14354
|
const t = useTerminology();
|
|
14358
|
-
const [countries, setCountries] = (0,
|
|
14355
|
+
const [countries, setCountries] = (0, import_react31.useState)(countriesProp);
|
|
14359
14356
|
const industries = organizationTypes;
|
|
14360
|
-
(0,
|
|
14357
|
+
(0, import_react31.useEffect)(() => {
|
|
14361
14358
|
if (countriesProp.length > 0) {
|
|
14362
14359
|
setCountries(countriesProp);
|
|
14363
14360
|
}
|
|
@@ -14378,7 +14375,7 @@ function CreateOrganizationPanel({
|
|
|
14378
14375
|
error: mutationError,
|
|
14379
14376
|
isPending
|
|
14380
14377
|
} = (0, import_connect_query21.useMutation)(import_frontier24.AdminServiceQueries.adminCreateOrganization);
|
|
14381
|
-
(0,
|
|
14378
|
+
(0, import_react31.useEffect)(() => {
|
|
14382
14379
|
if (mutationError) {
|
|
14383
14380
|
if (mutationError.message?.includes("already exists")) {
|
|
14384
14381
|
setError("name", { message: `${t.organization({ case: "capital" })} name already exists` });
|
|
@@ -14644,7 +14641,7 @@ var OrganizationListView = ({
|
|
|
14644
14641
|
countries = []
|
|
14645
14642
|
} = {}) => {
|
|
14646
14643
|
const t = useTerminology();
|
|
14647
|
-
const [showCreatePanel, setShowCreatePanel] = (0,
|
|
14644
|
+
const [showCreatePanel, setShowCreatePanel] = (0, import_react32.useState)(false);
|
|
14648
14645
|
const [tableQuery, setTableQuery] = (0, import_hooks3.useDebouncedState)(
|
|
14649
14646
|
INITIAL_QUERY4,
|
|
14650
14647
|
200
|
|
@@ -14685,7 +14682,7 @@ var OrganizationListView = ({
|
|
|
14685
14682
|
select: (data2) => data2?.plans || []
|
|
14686
14683
|
}
|
|
14687
14684
|
);
|
|
14688
|
-
(0,
|
|
14685
|
+
(0, import_react32.useEffect)(() => {
|
|
14689
14686
|
if (plansError) {
|
|
14690
14687
|
console.error("Failed to fetch plans:", plansError);
|
|
14691
14688
|
}
|
|
@@ -14789,7 +14786,7 @@ var OrganizationListView = ({
|
|
|
14789
14786
|
};
|
|
14790
14787
|
|
|
14791
14788
|
// admin/views/organizations/details/index.tsx
|
|
14792
|
-
var
|
|
14789
|
+
var import_react46 = require("react");
|
|
14793
14790
|
var import_connect_query31 = require("@connectrpc/connect-query");
|
|
14794
14791
|
var import_react_query12 = require("@tanstack/react-query");
|
|
14795
14792
|
var import_protobuf19 = require("@bufbuild/protobuf");
|
|
@@ -14798,8 +14795,8 @@ var import_protobuf19 = require("@bufbuild/protobuf");
|
|
|
14798
14795
|
var import_icons4 = require("@raystack/apsara/icons");
|
|
14799
14796
|
var import_apsara70 = require("@raystack/apsara");
|
|
14800
14797
|
|
|
14801
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14802
|
-
var digest45 = "
|
|
14798
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-iMgKCOUBhiuz/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
14799
|
+
var digest45 = "111467b4fdc58dcce7d4abf6afc489b2bb6912da826e7b78cad14fabf332f0ee";
|
|
14803
14800
|
var css45 = `._page_1jsqa_1 {
|
|
14804
14801
|
width: 100%;
|
|
14805
14802
|
height: 100vh;
|
|
@@ -14894,10 +14891,10 @@ var layout_module_css_default2 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
14894
14891
|
|
|
14895
14892
|
// admin/views/organizations/details/layout/invite-users-dialog.tsx
|
|
14896
14893
|
var import_apsara68 = require("@raystack/apsara");
|
|
14897
|
-
var
|
|
14894
|
+
var import_react34 = require("react");
|
|
14898
14895
|
|
|
14899
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14900
|
-
var digest46 = "
|
|
14896
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-vJ1WQ2j3Oj4R/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
14897
|
+
var digest46 = "25a0ae8bb39c012ce52c68e517bbe89b2519dff480032d1cd20853427dc5021f";
|
|
14901
14898
|
var css46 = `._page_1jsqa_1 {
|
|
14902
14899
|
width: 100%;
|
|
14903
14900
|
height: 100vh;
|
|
@@ -14993,7 +14990,7 @@ var layout_module_css_default3 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
14993
14990
|
// admin/views/organizations/details/contexts/organization-context.tsx
|
|
14994
14991
|
var import_frontier26 = require("@raystack/proton/frontier");
|
|
14995
14992
|
var import_protobuf10 = require("@bufbuild/protobuf");
|
|
14996
|
-
var
|
|
14993
|
+
var import_react33 = require("react");
|
|
14997
14994
|
var defaultOrganiztionContextValue = {
|
|
14998
14995
|
roles: [],
|
|
14999
14996
|
organization: (0, import_protobuf10.create)(import_frontier26.OrganizationSchema),
|
|
@@ -15025,7 +15022,7 @@ var defaultOrganiztionContextValue = {
|
|
|
15025
15022
|
countries: void 0,
|
|
15026
15023
|
organizationTypes: void 0
|
|
15027
15024
|
};
|
|
15028
|
-
var OrganizationContext = (0,
|
|
15025
|
+
var OrganizationContext = (0, import_react33.createContext)(defaultOrganiztionContextValue);
|
|
15029
15026
|
|
|
15030
15027
|
// admin/views/organizations/details/layout/invite-users-dialog.tsx
|
|
15031
15028
|
var import_zod8 = require("@hookform/resolvers/zod");
|
|
@@ -15052,11 +15049,11 @@ var inviteSchema2 = objectType({
|
|
|
15052
15049
|
});
|
|
15053
15050
|
var InviteUsersDialog = ({ onOpenChange }) => {
|
|
15054
15051
|
const t = useTerminology();
|
|
15055
|
-
const { roles = [], organization } = (0,
|
|
15052
|
+
const { roles = [], organization } = (0, import_react34.useContext)(OrganizationContext);
|
|
15056
15053
|
const queryClient = (0, import_react_query8.useQueryClient)();
|
|
15057
15054
|
const transport = (0, import_connect_query23.useTransport)();
|
|
15058
15055
|
const organizationId = organization?.id || "";
|
|
15059
|
-
const defaultRoleId = (0,
|
|
15056
|
+
const defaultRoleId = (0, import_react34.useMemo)(
|
|
15060
15057
|
() => roles?.find((role) => role.name === DEFAULT_INVITE_ROLE)?.id,
|
|
15061
15058
|
[roles]
|
|
15062
15059
|
);
|
|
@@ -15083,25 +15080,28 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
15083
15080
|
`${t.user({ case: "capital", plural: inviteCount > 1 })} invited`
|
|
15084
15081
|
);
|
|
15085
15082
|
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
15083
|
}
|
|
15093
15084
|
}
|
|
15094
15085
|
);
|
|
15095
15086
|
const onSubmit = async (data) => {
|
|
15096
15087
|
if (!organizationId)
|
|
15097
15088
|
return;
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15089
|
+
try {
|
|
15090
|
+
await createInvitation(
|
|
15091
|
+
(0, import_protobuf11.create)(import_frontier27.CreateOrganizationInvitationRequestSchema, {
|
|
15092
|
+
orgId: organizationId,
|
|
15093
|
+
userIds: data.emails,
|
|
15094
|
+
roleIds: data.role ? [data.role] : []
|
|
15095
|
+
})
|
|
15096
|
+
);
|
|
15097
|
+
} catch (error) {
|
|
15098
|
+
handleConnectError(error, {
|
|
15099
|
+
AlreadyExists: () => import_apsara68.toast.error("Invitation already exists"),
|
|
15100
|
+
InvalidArgument: (err) => import_apsara68.toast.error("Invalid input", { description: err.message }),
|
|
15101
|
+
PermissionDenied: () => import_apsara68.toast.error("You don't have permission to perform this action"),
|
|
15102
|
+
Default: (err) => import_apsara68.toast.error("Something went wrong", { description: err.message })
|
|
15103
|
+
});
|
|
15104
|
+
}
|
|
15105
15105
|
};
|
|
15106
15106
|
const isSubmitting = methods?.formState?.isSubmitting;
|
|
15107
15107
|
const errors = methods?.formState?.errors;
|
|
@@ -15180,11 +15180,11 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
15180
15180
|
|
|
15181
15181
|
// admin/views/organizations/details/layout/add-tokens-dialog.tsx
|
|
15182
15182
|
var import_apsara69 = require("@raystack/apsara");
|
|
15183
|
-
var
|
|
15183
|
+
var import_react35 = require("react");
|
|
15184
15184
|
var import_react_hook_form8 = require("react-hook-form");
|
|
15185
15185
|
|
|
15186
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15187
|
-
var digest47 = "
|
|
15186
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-1tmFR8JilPk4/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15187
|
+
var digest47 = "41996f2a0b4d9e3c0bf1f3cf0d0717411b56f943e104f0da105f8c3e5b934b32";
|
|
15188
15188
|
var css47 = `._page_1jsqa_1 {
|
|
15189
15189
|
width: 100%;
|
|
15190
15190
|
height: 100vh;
|
|
@@ -15292,7 +15292,7 @@ var addTokensSchema = objectType({
|
|
|
15292
15292
|
}).min(1).transform((num) => num.toString())
|
|
15293
15293
|
});
|
|
15294
15294
|
var AddTokensDialog = ({ onOpenChange }) => {
|
|
15295
|
-
const { organization, billingAccount, fetchTokenBalance, tokenProductId } = (0,
|
|
15295
|
+
const { organization, billingAccount, fetchTokenBalance, tokenProductId } = (0, import_react35.useContext)(OrganizationContext);
|
|
15296
15296
|
const queryClient = (0, import_react_query9.useQueryClient)();
|
|
15297
15297
|
const transport = (0, import_connect_query24.useTransport)();
|
|
15298
15298
|
const organisationId = organization?.id || "";
|
|
@@ -15399,7 +15399,7 @@ var AddTokensDialog = ({ onOpenChange }) => {
|
|
|
15399
15399
|
};
|
|
15400
15400
|
|
|
15401
15401
|
// admin/views/organizations/details/layout/navbar.tsx
|
|
15402
|
-
var
|
|
15402
|
+
var import_react36 = require("react");
|
|
15403
15403
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
15404
15404
|
var DropdownItem = ({ item }) => {
|
|
15405
15405
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
@@ -15427,11 +15427,11 @@ var NavbarActionMenu = ({
|
|
|
15427
15427
|
onExportTokens
|
|
15428
15428
|
}) => {
|
|
15429
15429
|
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,
|
|
15430
|
+
const [isInviteUsersDialogOpen, setIsInviteUsersDialogOpen] = (0, import_react36.useState)(false);
|
|
15431
|
+
const [isAddTokensDialogOpen, setIsAddTokensDialogOpen] = (0, import_react36.useState)(false);
|
|
15432
|
+
const [isMembersDownloading, setIsMembersDownloading] = (0, import_react36.useState)(false);
|
|
15433
|
+
const [isProjectsDownloading, setIsProjectsDownloading] = (0, import_react36.useState)(false);
|
|
15434
|
+
const [isTokensDownloading, setIsTokensDownloading] = (0, import_react36.useState)(false);
|
|
15435
15435
|
const openInviteUsersDialog = () => {
|
|
15436
15436
|
setIsInviteUsersDialogOpen(true);
|
|
15437
15437
|
};
|
|
@@ -15597,7 +15597,7 @@ var OrganizationsDetailsNavabar = ({
|
|
|
15597
15597
|
}) => {
|
|
15598
15598
|
const t = useTerminology();
|
|
15599
15599
|
const adminPaths = useAdminPaths();
|
|
15600
|
-
const { search } = (0,
|
|
15600
|
+
const { search } = (0, import_react36.useContext)(OrganizationContext);
|
|
15601
15601
|
function handleSearchChange(e) {
|
|
15602
15602
|
const value = e.target.value;
|
|
15603
15603
|
search.onChange(value);
|
|
@@ -15679,8 +15679,8 @@ var OrganizationsDetailsNavabar = ({
|
|
|
15679
15679
|
] });
|
|
15680
15680
|
};
|
|
15681
15681
|
|
|
15682
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15683
|
-
var digest48 = "
|
|
15682
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-VusFKM0ujDzY/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15683
|
+
var digest48 = "54350997c8af2cb1f7559bfe043f6b86d343d5fa47c14295b7bc54fae2efcc70";
|
|
15684
15684
|
var css48 = `._page_1jsqa_1 {
|
|
15685
15685
|
width: 100%;
|
|
15686
15686
|
height: 100vh;
|
|
@@ -15782,8 +15782,8 @@ var import_apsara77 = require("@raystack/apsara");
|
|
|
15782
15782
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
15783
15783
|
var import_apsara71 = require("@raystack/apsara");
|
|
15784
15784
|
|
|
15785
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15786
|
-
var digest49 = "
|
|
15785
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-TsdSt4qw8lY0/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15786
|
+
var digest49 = "ef2f7d097cab74a793e3b95f72425aa1028e979588ef24fd63a7f22a3a1796fa";
|
|
15787
15787
|
var css49 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15788
15788
|
width: 120px;
|
|
15789
15789
|
}
|
|
@@ -15816,12 +15816,12 @@ var side_panel_module_css_default5 = { "side-panel-section-item-label": "_side-p
|
|
|
15816
15816
|
|
|
15817
15817
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
15818
15818
|
var import_dayjs11 = __toESM(require("dayjs"));
|
|
15819
|
-
var
|
|
15819
|
+
var import_react37 = require("react");
|
|
15820
15820
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
15821
15821
|
var OrganizationDetailsSection = ({
|
|
15822
15822
|
organization
|
|
15823
15823
|
}) => {
|
|
15824
|
-
const { appUrl } = (0,
|
|
15824
|
+
const { appUrl } = (0, import_react37.useContext)(OrganizationContext);
|
|
15825
15825
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_apsara71.List, { children: [
|
|
15826
15826
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_apsara71.List.Header, { children: "Organization Details" }),
|
|
15827
15827
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_apsara71.List.Item, { children: [
|
|
@@ -15871,10 +15871,10 @@ var OrganizationDetailsSection = ({
|
|
|
15871
15871
|
|
|
15872
15872
|
// admin/views/organizations/details/side-panel/kyc-section.tsx
|
|
15873
15873
|
var import_apsara72 = require("@raystack/apsara");
|
|
15874
|
-
var
|
|
15874
|
+
var import_react38 = require("react");
|
|
15875
15875
|
|
|
15876
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15877
|
-
var digest50 = "
|
|
15876
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-cUVTejjDk6J3/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15877
|
+
var digest50 = "b214b36d5f3a990375f4ea27f4f1324c786ac32b18567788eec1b636d4915a69";
|
|
15878
15878
|
var css50 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15879
15879
|
width: 120px;
|
|
15880
15880
|
}
|
|
@@ -15909,7 +15909,7 @@ var side_panel_module_css_default6 = { "side-panel-section-item-label": "_side-p
|
|
|
15909
15909
|
var import_icons5 = require("@raystack/apsara/icons");
|
|
15910
15910
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
15911
15911
|
var KYCDetailsSection = () => {
|
|
15912
|
-
const { isKYCLoading, kycDetails } = (0,
|
|
15912
|
+
const { isKYCLoading, kycDetails } = (0, import_react38.useContext)(OrganizationContext);
|
|
15913
15913
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_apsara72.List, { children: [
|
|
15914
15914
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_apsara72.List.Header, { children: "KYC Details" }),
|
|
15915
15915
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_apsara72.List.Item, { children: [
|
|
@@ -15954,11 +15954,11 @@ var KYCDetailsSection = () => {
|
|
|
15954
15954
|
};
|
|
15955
15955
|
|
|
15956
15956
|
// admin/views/organizations/details/side-panel/plan-details-section.tsx
|
|
15957
|
-
var
|
|
15957
|
+
var import_react39 = require("react");
|
|
15958
15958
|
var import_apsara73 = require("@raystack/apsara");
|
|
15959
15959
|
|
|
15960
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15961
|
-
var digest51 = "
|
|
15960
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-1y4ut6Yru2Rk/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15961
|
+
var digest51 = "053ead00ae0dd459e2eb97e5f1936a6788615f4d01510f03ab91d823a85f43c4";
|
|
15962
15962
|
var css51 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15963
15963
|
width: 120px;
|
|
15964
15964
|
}
|
|
@@ -15995,7 +15995,7 @@ var import_frontier29 = require("@raystack/proton/frontier");
|
|
|
15995
15995
|
var import_protobuf13 = require("@bufbuild/protobuf");
|
|
15996
15996
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
15997
15997
|
var PlanDetailsSection = () => {
|
|
15998
|
-
const { billingAccount, organization } = (0,
|
|
15998
|
+
const { billingAccount, organization } = (0, import_react39.useContext)(OrganizationContext);
|
|
15999
15999
|
const billingAccountId = billingAccount?.id || "";
|
|
16000
16000
|
const organizationId = organization?.id || "";
|
|
16001
16001
|
const { data: activeSubscription, isLoading: isSubscriptionLoading, error: subscriptionsError } = (0, import_connect_query25.useQuery)(
|
|
@@ -16059,8 +16059,8 @@ var PlanDetailsSection = () => {
|
|
|
16059
16059
|
// admin/views/organizations/details/side-panel/tokens-details-section.tsx
|
|
16060
16060
|
var import_apsara74 = require("@raystack/apsara");
|
|
16061
16061
|
|
|
16062
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16063
|
-
var digest52 = "
|
|
16062
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-j2rYLkBxNFsf/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16063
|
+
var digest52 = "555f0db963a8ea3530fdccf191ff041bee65226c626923a6e952606bacb1a559";
|
|
16064
16064
|
var css52 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16065
16065
|
width: 120px;
|
|
16066
16066
|
}
|
|
@@ -16092,7 +16092,7 @@ var css52 = `._side-panel-section-item-label_yeg6h_1 {
|
|
|
16092
16092
|
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
16093
|
|
|
16094
16094
|
// admin/views/organizations/details/side-panel/tokens-details-section.tsx
|
|
16095
|
-
var
|
|
16095
|
+
var import_react40 = require("react");
|
|
16096
16096
|
var import_connect_query26 = require("@connectrpc/connect-query");
|
|
16097
16097
|
var import_frontier30 = require("@raystack/proton/frontier");
|
|
16098
16098
|
var import_protobuf14 = require("@bufbuild/protobuf");
|
|
@@ -16104,7 +16104,7 @@ var TokensDetailsSection = () => {
|
|
|
16104
16104
|
organization,
|
|
16105
16105
|
isTokenBalanceLoading,
|
|
16106
16106
|
billingAccountDetails
|
|
16107
|
-
} = (0,
|
|
16107
|
+
} = (0, import_react40.useContext)(OrganizationContext);
|
|
16108
16108
|
const organizationId = organization?.id || "";
|
|
16109
16109
|
const billingAccountId = billingAccount?.id || "";
|
|
16110
16110
|
const { data: tokensUsed = "0", isLoading: isTokensLoading, error } = (0, import_connect_query26.useQuery)(
|
|
@@ -16118,7 +16118,7 @@ var TokensDetailsSection = () => {
|
|
|
16118
16118
|
select: (data) => String(data?.debited?.amount || "0")
|
|
16119
16119
|
}
|
|
16120
16120
|
);
|
|
16121
|
-
(0,
|
|
16121
|
+
(0, import_react40.useEffect)(() => {
|
|
16122
16122
|
if (error) {
|
|
16123
16123
|
console.error("Error fetching debited transactions:", error);
|
|
16124
16124
|
}
|
|
@@ -16161,8 +16161,8 @@ var TokensDetailsSection = () => {
|
|
|
16161
16161
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
16162
16162
|
var import_apsara75 = require("@raystack/apsara");
|
|
16163
16163
|
|
|
16164
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16165
|
-
var digest53 = "
|
|
16164
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-4SOz7czjd29B/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16165
|
+
var digest53 = "b55150ad6ea243466e7abb129f89f69d93fe46963332c18a6dd276009d14f89f";
|
|
16166
16166
|
var css53 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16167
16167
|
width: 120px;
|
|
16168
16168
|
}
|
|
@@ -16194,14 +16194,14 @@ var css53 = `._side-panel-section-item-label_yeg6h_1 {
|
|
|
16194
16194
|
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
16195
|
|
|
16196
16196
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
16197
|
-
var
|
|
16197
|
+
var import_react41 = require("react");
|
|
16198
16198
|
var import_apsara76 = require("@raystack/apsara");
|
|
16199
16199
|
var import_connect_query27 = require("@connectrpc/connect-query");
|
|
16200
16200
|
var import_frontier31 = require("@raystack/proton/frontier");
|
|
16201
16201
|
var import_protobuf15 = require("@bufbuild/protobuf");
|
|
16202
16202
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
16203
16203
|
var BillingDetailsSection = () => {
|
|
16204
|
-
const { billingAccount, organization } = (0,
|
|
16204
|
+
const { billingAccount, organization } = (0, import_react41.useContext)(OrganizationContext);
|
|
16205
16205
|
const organizationId = organization?.id || "";
|
|
16206
16206
|
const billingAccountId = billingAccount?.id || "";
|
|
16207
16207
|
const { data: upcomingInvoice, isLoading, error } = (0, import_connect_query27.useQuery)(
|
|
@@ -16215,7 +16215,7 @@ var BillingDetailsSection = () => {
|
|
|
16215
16215
|
select: (data) => data?.invoice
|
|
16216
16216
|
}
|
|
16217
16217
|
);
|
|
16218
|
-
(0,
|
|
16218
|
+
(0, import_react41.useEffect)(() => {
|
|
16219
16219
|
if (error) {
|
|
16220
16220
|
console.error("Error fetching upcoming invoice:", error);
|
|
16221
16221
|
}
|
|
@@ -16247,7 +16247,7 @@ var BillingDetailsSection = () => {
|
|
|
16247
16247
|
] }),
|
|
16248
16248
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_apsara75.List.Item, { children: [
|
|
16249
16249
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_apsara75.List.Label, { className: side_panel_module_css_default9["side-panel-section-item-label"], children: "Address" }),
|
|
16250
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_apsara75.List.Value, { className: side_panel_module_css_default9["side-panel-section-item-value"], children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Skeleton, {}) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_apsara75.Text, { children: billingAccount?.address ?
|
|
16250
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_apsara75.List.Value, { className: side_panel_module_css_default9["side-panel-section-item-value"], children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Skeleton, {}) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_apsara75.Text, { children: billingAccount?.address ? convertBillingAddressToString(billingAccount.address) : "N/A" }) })
|
|
16251
16251
|
] }),
|
|
16252
16252
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_apsara75.List.Item, { children: [
|
|
16253
16253
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_apsara75.List.Label, { className: side_panel_module_css_default9["side-panel-section-item-label"], children: "Next billing date" }),
|
|
@@ -16303,14 +16303,14 @@ function OrgSidePanel({ organization }) {
|
|
|
16303
16303
|
}
|
|
16304
16304
|
|
|
16305
16305
|
// admin/views/organizations/details/layout/index.tsx
|
|
16306
|
-
var
|
|
16306
|
+
var import_react45 = require("react");
|
|
16307
16307
|
var import_icons6 = require("@raystack/apsara/icons");
|
|
16308
16308
|
|
|
16309
16309
|
// admin/views/organizations/details/edit/kyc.tsx
|
|
16310
16310
|
var import_apsara78 = require("@raystack/apsara");
|
|
16311
16311
|
|
|
16312
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16313
|
-
var digest54 = "
|
|
16312
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-besRuYB3saEv/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16313
|
+
var digest54 = "635dfa2b87be5e1af9600762f7e6518e152ff59a1ecd00130c37e590e3512cfe";
|
|
16314
16314
|
var css54 = `._drawer-content_1o0os_1 {
|
|
16315
16315
|
min-width: 500px;
|
|
16316
16316
|
padding: 0;
|
|
@@ -16363,7 +16363,7 @@ var css54 = `._drawer-content_1o0os_1 {
|
|
|
16363
16363
|
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
16364
|
|
|
16365
16365
|
// admin/views/organizations/details/edit/kyc.tsx
|
|
16366
|
-
var
|
|
16366
|
+
var import_react42 = require("react");
|
|
16367
16367
|
var import_react_hook_form9 = require("react-hook-form");
|
|
16368
16368
|
var import_zod11 = require("@hookform/resolvers/zod");
|
|
16369
16369
|
var import_connect_query28 = require("@connectrpc/connect-query");
|
|
@@ -16384,7 +16384,7 @@ var kycUpdateSchema = external_exports.object({
|
|
|
16384
16384
|
}
|
|
16385
16385
|
});
|
|
16386
16386
|
function EditKYCPanel({ onClose }) {
|
|
16387
|
-
const { organization, kycDetails, updateKYCDetails } = (0,
|
|
16387
|
+
const { organization, kycDetails, updateKYCDetails } = (0, import_react42.useContext)(OrganizationContext);
|
|
16388
16388
|
const queryClient = (0, import_react_query10.useQueryClient)();
|
|
16389
16389
|
const transport = (0, import_connect_query28.useTransport)();
|
|
16390
16390
|
const orgId = organization?.id || "";
|
|
@@ -16545,10 +16545,10 @@ function EditKYCPanel({ onClose }) {
|
|
|
16545
16545
|
}
|
|
16546
16546
|
|
|
16547
16547
|
// admin/views/organizations/details/edit/organization.tsx
|
|
16548
|
-
var
|
|
16548
|
+
var import_react43 = require("react");
|
|
16549
16549
|
|
|
16550
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16551
|
-
var digest55 = "
|
|
16550
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-U2UAPisGdX8Y/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16551
|
+
var digest55 = "88cdbea081c00a0d4cb956cb5acc1426fc97b691db404f65890ac4c5398099a1";
|
|
16552
16552
|
var css55 = `._drawer-content_1o0os_1 {
|
|
16553
16553
|
min-width: 500px;
|
|
16554
16554
|
padding: 0;
|
|
@@ -16646,12 +16646,12 @@ function getDefaultValue(organization, industries) {
|
|
|
16646
16646
|
}
|
|
16647
16647
|
function EditOrganizationPanel({ onClose }) {
|
|
16648
16648
|
const t = useTerminology();
|
|
16649
|
-
const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = (0,
|
|
16650
|
-
const [countries, setCountries] = (0,
|
|
16649
|
+
const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = (0, import_react43.useContext)(OrganizationContext);
|
|
16650
|
+
const [countries, setCountries] = (0, import_react43.useState)(countriesFromContext);
|
|
16651
16651
|
const queryClient = (0, import_react_query11.useQueryClient)();
|
|
16652
16652
|
const transport = (0, import_connect_query29.useTransport)();
|
|
16653
16653
|
const orgId = organization?.id || "";
|
|
16654
|
-
(0,
|
|
16654
|
+
(0, import_react43.useEffect)(() => {
|
|
16655
16655
|
if (countriesFromContext.length > 0)
|
|
16656
16656
|
setCountries(countriesFromContext);
|
|
16657
16657
|
}, [countriesFromContext]);
|
|
@@ -16683,7 +16683,7 @@ function EditOrganizationPanel({ onClose }) {
|
|
|
16683
16683
|
onClose();
|
|
16684
16684
|
}
|
|
16685
16685
|
});
|
|
16686
|
-
(0,
|
|
16686
|
+
(0, import_react43.useEffect)(() => {
|
|
16687
16687
|
if (mutationError) {
|
|
16688
16688
|
if (mutationError.message?.includes("already exists")) {
|
|
16689
16689
|
setError("name", { message: `${t.organization({ case: "capital" })} name already exists` });
|
|
@@ -16910,8 +16910,8 @@ function EditOrganizationPanel({ onClose }) {
|
|
|
16910
16910
|
// admin/views/organizations/details/edit/billing.tsx
|
|
16911
16911
|
var import_apsara80 = require("@raystack/apsara");
|
|
16912
16912
|
|
|
16913
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16914
|
-
var digest56 = "
|
|
16913
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-khdHUu1j2DR7/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16914
|
+
var digest56 = "7757a460d4655c3763bb24ea76380ad30b3703acd0ee41a782a93ad7149de2ab";
|
|
16915
16915
|
var css56 = `._drawer-content_1o0os_1 {
|
|
16916
16916
|
min-width: 500px;
|
|
16917
16917
|
padding: 0;
|
|
@@ -16964,7 +16964,7 @@ var css56 = `._drawer-content_1o0os_1 {
|
|
|
16964
16964
|
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
16965
|
|
|
16966
16966
|
// admin/views/organizations/details/edit/billing.tsx
|
|
16967
|
-
var
|
|
16967
|
+
var import_react44 = require("react");
|
|
16968
16968
|
var import_react_hook_form11 = require("react-hook-form");
|
|
16969
16969
|
var import_zod15 = require("@hookform/resolvers/zod");
|
|
16970
16970
|
var import_connect_query30 = require("@connectrpc/connect-query");
|
|
@@ -17012,7 +17012,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17012
17012
|
billingAccountDetails,
|
|
17013
17013
|
isBillingAccountLoading: isLoading,
|
|
17014
17014
|
fetchBillingAccountDetails
|
|
17015
|
-
} = (0,
|
|
17015
|
+
} = (0, import_react44.useContext)(OrganizationContext);
|
|
17016
17016
|
const organizationId = billingAccount?.orgId || "";
|
|
17017
17017
|
const billingId = billingAccount?.id || "";
|
|
17018
17018
|
const {
|
|
@@ -17025,7 +17025,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17025
17025
|
} = (0, import_react_hook_form11.useForm)({
|
|
17026
17026
|
resolver: (0, import_zod15.zodResolver)(billingDetailsUpdateSchema)
|
|
17027
17027
|
});
|
|
17028
|
-
const billingDetailsData = (0,
|
|
17028
|
+
const billingDetailsData = (0, import_react44.useMemo)(() => {
|
|
17029
17029
|
const creditMin = billingAccountDetails?.creditMin || 0n;
|
|
17030
17030
|
const absoluteCreditMin = creditMin < 0n ? creditMin * BigInt(-1) : creditMin;
|
|
17031
17031
|
const dueInDays = billingAccountDetails?.dueInDays || 0n;
|
|
@@ -17036,7 +17036,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17036
17036
|
dueInDays: dueInDays.toString()
|
|
17037
17037
|
};
|
|
17038
17038
|
}, [billingAccountDetails]);
|
|
17039
|
-
(0,
|
|
17039
|
+
(0, import_react44.useEffect)(() => {
|
|
17040
17040
|
if (billingDetailsData) {
|
|
17041
17041
|
reset(billingDetailsData);
|
|
17042
17042
|
}
|
|
@@ -17074,7 +17074,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17074
17074
|
console.error("Failed to update billing details:", error);
|
|
17075
17075
|
}
|
|
17076
17076
|
};
|
|
17077
|
-
const onValueChange = (0,
|
|
17077
|
+
const onValueChange = (0, import_react44.useCallback)((value) => {
|
|
17078
17078
|
const paymentType = value;
|
|
17079
17079
|
setValue("tokenPaymentType", paymentType);
|
|
17080
17080
|
if (paymentType === "prepaid") {
|
|
@@ -17208,10 +17208,10 @@ var OrganizationDetailsLayout = ({
|
|
|
17208
17208
|
onNavigate
|
|
17209
17209
|
}) => {
|
|
17210
17210
|
const t = useTerminology();
|
|
17211
|
-
const [showSidePanel, setShowSidePanel] = (0,
|
|
17212
|
-
const [showKYCPanel, setShowKYCPanel] = (0,
|
|
17213
|
-
const [showEditOrgPanel, setShowEditOrgPanel] = (0,
|
|
17214
|
-
const [showEditBillingPanel, setShowEditBillingPanel] = (0,
|
|
17211
|
+
const [showSidePanel, setShowSidePanel] = (0, import_react45.useState)(true);
|
|
17212
|
+
const [showKYCPanel, setShowKYCPanel] = (0, import_react45.useState)(false);
|
|
17213
|
+
const [showEditOrgPanel, setShowEditOrgPanel] = (0, import_react45.useState)(false);
|
|
17214
|
+
const [showEditBillingPanel, setShowEditBillingPanel] = (0, import_react45.useState)(false);
|
|
17215
17215
|
function toggleSidePanel() {
|
|
17216
17216
|
setShowSidePanel(!showSidePanel);
|
|
17217
17217
|
}
|
|
@@ -17301,8 +17301,8 @@ var OrganizationDetailsView = ({
|
|
|
17301
17301
|
onNavigate,
|
|
17302
17302
|
children
|
|
17303
17303
|
}) => {
|
|
17304
|
-
const [isSearchVisible, setIsSearchVisible] = (0,
|
|
17305
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
17304
|
+
const [isSearchVisible, setIsSearchVisible] = (0, import_react46.useState)(false);
|
|
17305
|
+
const [searchQuery, setSearchQuery] = (0, import_react46.useState)("");
|
|
17306
17306
|
const queryClient = (0, import_react_query12.useQueryClient)();
|
|
17307
17307
|
const transport = (0, import_connect_query31.useTransport)();
|
|
17308
17308
|
const {
|
|
@@ -17335,7 +17335,7 @@ var OrganizationDetailsView = ({
|
|
|
17335
17335
|
enabled: !!organizationId
|
|
17336
17336
|
}
|
|
17337
17337
|
);
|
|
17338
|
-
const kycDetails = (0,
|
|
17338
|
+
const kycDetails = (0, import_react46.useMemo)(() => kycData?.organizationKyc, [kycData]);
|
|
17339
17339
|
function updateKYCDetails(kyc) {
|
|
17340
17340
|
if (!organizationId)
|
|
17341
17341
|
return;
|
|
@@ -17440,7 +17440,7 @@ var OrganizationDetailsView = ({
|
|
|
17440
17440
|
select: (data) => String(data?.balance?.amount || "0")
|
|
17441
17441
|
}
|
|
17442
17442
|
);
|
|
17443
|
-
(0,
|
|
17443
|
+
(0, import_react46.useEffect)(() => {
|
|
17444
17444
|
if (organizationError) {
|
|
17445
17445
|
console.error("Failed to fetch organization:", organizationError);
|
|
17446
17446
|
}
|
|
@@ -17529,8 +17529,8 @@ var OrganizationDetailsView = ({
|
|
|
17529
17529
|
// admin/views/organizations/details/security/index.tsx
|
|
17530
17530
|
var import_apsara84 = require("@raystack/apsara");
|
|
17531
17531
|
|
|
17532
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17533
|
-
var digest57 = "
|
|
17532
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-KF82mCFX5otp/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
17533
|
+
var digest57 = "c55621dafe89d7929e5754e16719790378b71fed008cd6f37aa39a7f2681fc0c";
|
|
17534
17534
|
var css57 = `._container_1wkae_1 {
|
|
17535
17535
|
width: 100%;
|
|
17536
17536
|
}
|
|
@@ -17571,11 +17571,11 @@ var css57 = `._container_1wkae_1 {
|
|
|
17571
17571
|
var security_module_css_default2 = { "container": "_container_1wkae_1", "content": "_content_1wkae_5", "domains-list": "_domains-list_1wkae_11", "domainsList": "_domains-list_1wkae_11", "domains-list-item": "_domains-list-item_1wkae_18", "domainsListItem": "_domains-list-item_1wkae_18" };
|
|
17572
17572
|
|
|
17573
17573
|
// admin/views/organizations/details/security/index.tsx
|
|
17574
|
-
var
|
|
17574
|
+
var import_react49 = require("react");
|
|
17575
17575
|
|
|
17576
17576
|
// admin/views/organizations/details/security/block-organization.tsx
|
|
17577
17577
|
var import_apsara82 = require("@raystack/apsara");
|
|
17578
|
-
var
|
|
17578
|
+
var import_react47 = require("react");
|
|
17579
17579
|
var import_connect_query32 = require("@connectrpc/connect-query");
|
|
17580
17580
|
var import_frontier36 = require("@raystack/proton/frontier");
|
|
17581
17581
|
var import_protobuf20 = require("@bufbuild/protobuf");
|
|
@@ -17583,10 +17583,10 @@ var import_react_query13 = require("@tanstack/react-query");
|
|
|
17583
17583
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
17584
17584
|
var BlockOrganizationDialog = () => {
|
|
17585
17585
|
const t = useTerminology();
|
|
17586
|
-
const { organization } = (0,
|
|
17586
|
+
const { organization } = (0, import_react47.useContext)(OrganizationContext);
|
|
17587
17587
|
const queryClient = (0, import_react_query13.useQueryClient)();
|
|
17588
17588
|
const transport = (0, import_connect_query32.useTransport)();
|
|
17589
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
17589
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react47.useState)(false);
|
|
17590
17590
|
const { mutateAsync: disableOrganization, isPending: isDisabling } = (0, import_connect_query32.useMutation)(
|
|
17591
17591
|
import_frontier36.FrontierServiceQueries.disableOrganization,
|
|
17592
17592
|
{
|
|
@@ -17723,8 +17723,8 @@ var BlockOrganizationSection = () => {
|
|
|
17723
17723
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17724
17724
|
var import_apsara83 = require("@raystack/apsara");
|
|
17725
17725
|
|
|
17726
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17727
|
-
var digest58 = "
|
|
17726
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-bG3JXapoztjY/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
17727
|
+
var digest58 = "1d040db094b7fde499713881e9740cbc65883a9b1c7ab41c90c842225abb2eb1";
|
|
17728
17728
|
var css58 = `._container_1wkae_1 {
|
|
17729
17729
|
width: 100%;
|
|
17730
17730
|
}
|
|
@@ -17765,7 +17765,7 @@ var css58 = `._container_1wkae_1 {
|
|
|
17765
17765
|
var security_module_css_default3 = { "container": "_container_1wkae_1", "content": "_content_1wkae_5", "domains-list": "_domains-list_1wkae_11", "domainsList": "_domains-list_1wkae_11", "domains-list-item": "_domains-list-item_1wkae_18", "domainsListItem": "_domains-list-item_1wkae_18" };
|
|
17766
17766
|
|
|
17767
17767
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17768
|
-
var
|
|
17768
|
+
var import_react48 = require("react");
|
|
17769
17769
|
var import_connect_query33 = require("@connectrpc/connect-query");
|
|
17770
17770
|
var import_react_query14 = require("@tanstack/react-query");
|
|
17771
17771
|
var import_frontier37 = require("@raystack/proton/frontier");
|
|
@@ -17774,8 +17774,8 @@ var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
|
17774
17774
|
var DeleteDomainDialog = ({
|
|
17775
17775
|
domain
|
|
17776
17776
|
}) => {
|
|
17777
|
-
const { organization } = (0,
|
|
17778
|
-
const [isDialogOpen, setIsDialogOpen] = (0,
|
|
17777
|
+
const { organization } = (0, import_react48.useContext)(OrganizationContext);
|
|
17778
|
+
const [isDialogOpen, setIsDialogOpen] = (0, import_react48.useState)(false);
|
|
17779
17779
|
const queryClient = (0, import_react_query14.useQueryClient)();
|
|
17780
17780
|
const transport = (0, import_connect_query33.useTransport)();
|
|
17781
17781
|
const { mutateAsync: deleteDomain, isPending } = (0, import_connect_query33.useMutation)(
|
|
@@ -17882,7 +17882,7 @@ var DomainsList = ({
|
|
|
17882
17882
|
var import_connect_query34 = require("@connectrpc/connect-query");
|
|
17883
17883
|
var import_frontier38 = require("@raystack/proton/frontier");
|
|
17884
17884
|
var import_protobuf22 = require("@bufbuild/protobuf");
|
|
17885
|
-
var
|
|
17885
|
+
var import_react50 = require("react");
|
|
17886
17886
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
17887
17887
|
var AddDomainSection = () => {
|
|
17888
17888
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_apsara84.Flex, { gap: 5, justify: "between", children: [
|
|
@@ -17905,7 +17905,7 @@ var AddDomainSection = () => {
|
|
|
17905
17905
|
] });
|
|
17906
17906
|
};
|
|
17907
17907
|
var OrganizationSecurity = () => {
|
|
17908
|
-
const { organization } = (0,
|
|
17908
|
+
const { organization } = (0, import_react49.useContext)(OrganizationContext);
|
|
17909
17909
|
const { data: domains, isLoading, error } = (0, import_connect_query34.useQuery)(
|
|
17910
17910
|
import_frontier38.FrontierServiceQueries.listOrganizationDomains,
|
|
17911
17911
|
(0, import_protobuf22.create)(import_frontier38.ListOrganizationDomainsRequestSchema, {
|
|
@@ -17916,7 +17916,7 @@ var OrganizationSecurity = () => {
|
|
|
17916
17916
|
select: (data) => data?.domains || []
|
|
17917
17917
|
}
|
|
17918
17918
|
);
|
|
17919
|
-
(0,
|
|
17919
|
+
(0, import_react50.useEffect)(() => {
|
|
17920
17920
|
if (error) {
|
|
17921
17921
|
import_apsara84.toast.error("Something went wrong", {
|
|
17922
17922
|
description: "Unable to fetch domains"
|
|
@@ -17945,8 +17945,8 @@ var OrganizationSecurity = () => {
|
|
|
17945
17945
|
// admin/views/organizations/details/members/index.tsx
|
|
17946
17946
|
var import_apsara87 = require("@raystack/apsara");
|
|
17947
17947
|
|
|
17948
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17949
|
-
var digest59 = "
|
|
17948
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-7LmM4uURPYTX/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
17949
|
+
var digest59 = "d7ab455ae0d4dfb1270e21a605e1d1380af981b4695ccead5a07052671ba3ac9";
|
|
17950
17950
|
var css59 = `._container_6bi1j_1 {
|
|
17951
17951
|
width: 100%;
|
|
17952
17952
|
}
|
|
@@ -17998,13 +17998,13 @@ var css59 = `._container_6bi1j_1 {
|
|
|
17998
17998
|
var members_module_css_default = { "container": "_container_6bi1j_1", "name-column": "_name-column_6bi1j_5", "nameColumn": "_name-column_6bi1j_5", "empty-state": "_empty-state_6bi1j_9", "emptyState": "_empty-state_6bi1j_9", "empty-state-subheading": "_empty-state-subheading_6bi1j_13", "emptyStateSubheading": "_empty-state-subheading_6bi1j_13", "table": "_table_6bi1j_18", "table-wrapper": "_table-wrapper_6bi1j_23", "tableWrapper": "_table-wrapper_6bi1j_23", "table-header": "_table-header_6bi1j_29", "tableHeader": "_table-header_6bi1j_29", "table-action-column": "_table-action-column_6bi1j_34", "tableActionColumn": "_table-action-column_6bi1j_34" };
|
|
17999
17999
|
|
|
18000
18000
|
// admin/views/organizations/details/members/index.tsx
|
|
18001
|
-
var
|
|
18001
|
+
var import_react52 = require("react");
|
|
18002
18002
|
|
|
18003
18003
|
// admin/views/organizations/details/members/columns.tsx
|
|
18004
18004
|
var import_apsara85 = require("@raystack/apsara");
|
|
18005
18005
|
|
|
18006
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18007
|
-
var digest60 = "
|
|
18006
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-pWHwOrVtLYN1/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
18007
|
+
var digest60 = "9b0003f0e505519a1f3e356c6ddd8197dea793db8dc28c3a3d5ab9edd71c73ce";
|
|
18008
18008
|
var css60 = `._container_6bi1j_1 {
|
|
18009
18009
|
width: 100%;
|
|
18010
18010
|
}
|
|
@@ -18203,17 +18203,18 @@ var RemoveMember = ({
|
|
|
18203
18203
|
onClose
|
|
18204
18204
|
}) => {
|
|
18205
18205
|
const t = useTerminology();
|
|
18206
|
-
const { mutateAsync:
|
|
18207
|
-
import_frontier39.FrontierServiceQueries.
|
|
18206
|
+
const { mutateAsync: removeOrganizationMember, isPending } = (0, import_connect_query35.useMutation)(
|
|
18207
|
+
import_frontier39.FrontierServiceQueries.removeOrganizationMember
|
|
18208
18208
|
);
|
|
18209
18209
|
async function onSubmit() {
|
|
18210
18210
|
try {
|
|
18211
18211
|
if (!user)
|
|
18212
18212
|
return;
|
|
18213
|
-
await
|
|
18214
|
-
(0, import_protobuf23.create)(import_frontier39.
|
|
18215
|
-
|
|
18216
|
-
|
|
18213
|
+
await removeOrganizationMember(
|
|
18214
|
+
(0, import_protobuf23.create)(import_frontier39.RemoveOrganizationMemberRequestSchema, {
|
|
18215
|
+
orgId: organizationId,
|
|
18216
|
+
principalId: user?.id || "",
|
|
18217
|
+
principalType: "app/user"
|
|
18217
18218
|
})
|
|
18218
18219
|
);
|
|
18219
18220
|
if (onRemove) {
|
|
@@ -18279,12 +18280,12 @@ var RemoveMember = ({
|
|
|
18279
18280
|
};
|
|
18280
18281
|
|
|
18281
18282
|
// ../node_modules/.pnpm/usehooks-ts@3.1.1_react@19.2.4/node_modules/usehooks-ts/dist/index.js
|
|
18282
|
-
var
|
|
18283
|
+
var import_react51 = require("react");
|
|
18283
18284
|
var import_lodash2 = __toESM(require_lodash(), 1);
|
|
18284
18285
|
function useUnmount(func) {
|
|
18285
|
-
const funcRef = (0,
|
|
18286
|
+
const funcRef = (0, import_react51.useRef)(func);
|
|
18286
18287
|
funcRef.current = func;
|
|
18287
|
-
(0,
|
|
18288
|
+
(0, import_react51.useEffect)(
|
|
18288
18289
|
() => () => {
|
|
18289
18290
|
funcRef.current();
|
|
18290
18291
|
},
|
|
@@ -18292,13 +18293,13 @@ function useUnmount(func) {
|
|
|
18292
18293
|
);
|
|
18293
18294
|
}
|
|
18294
18295
|
function useDebounceCallback(func, delay = 500, options) {
|
|
18295
|
-
const debouncedFunc = (0,
|
|
18296
|
+
const debouncedFunc = (0, import_react51.useRef)();
|
|
18296
18297
|
useUnmount(() => {
|
|
18297
18298
|
if (debouncedFunc.current) {
|
|
18298
18299
|
debouncedFunc.current.cancel();
|
|
18299
18300
|
}
|
|
18300
18301
|
});
|
|
18301
|
-
const debounced = (0,
|
|
18302
|
+
const debounced = (0, import_react51.useMemo)(() => {
|
|
18302
18303
|
const debouncedFuncInstance = (0, import_lodash2.default)(func, delay, options);
|
|
18303
18304
|
const wrappedFunc = (...args) => {
|
|
18304
18305
|
return debouncedFuncInstance(...args);
|
|
@@ -18314,7 +18315,7 @@ function useDebounceCallback(func, delay = 500, options) {
|
|
|
18314
18315
|
};
|
|
18315
18316
|
return wrappedFunc;
|
|
18316
18317
|
}, [func, delay, options]);
|
|
18317
|
-
(0,
|
|
18318
|
+
(0, import_react51.useEffect)(() => {
|
|
18318
18319
|
debouncedFunc.current = (0, import_lodash2.default)(func, delay, options);
|
|
18319
18320
|
}, [func, delay, options]);
|
|
18320
18321
|
return debounced;
|
|
@@ -18322,8 +18323,8 @@ function useDebounceCallback(func, delay = 500, options) {
|
|
|
18322
18323
|
function useDebounceValue(initialValue, delay, options) {
|
|
18323
18324
|
const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);
|
|
18324
18325
|
const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;
|
|
18325
|
-
const [debouncedValue, setDebouncedValue] = (0,
|
|
18326
|
-
const previousValueRef = (0,
|
|
18326
|
+
const [debouncedValue, setDebouncedValue] = (0, import_react51.useState)(unwrappedInitialValue);
|
|
18327
|
+
const previousValueRef = (0, import_react51.useRef)(unwrappedInitialValue);
|
|
18327
18328
|
const updateDebouncedValue = useDebounceCallback(
|
|
18328
18329
|
setDebouncedValue,
|
|
18329
18330
|
delay,
|
|
@@ -18380,7 +18381,7 @@ var ErrorState = () => {
|
|
|
18380
18381
|
);
|
|
18381
18382
|
};
|
|
18382
18383
|
function OrganizationMembersView() {
|
|
18383
|
-
const { roles = [], organization, search } = (0,
|
|
18384
|
+
const { roles = [], organization, search } = (0, import_react52.useContext)(OrganizationContext);
|
|
18384
18385
|
const {
|
|
18385
18386
|
onChange: onSearchChange,
|
|
18386
18387
|
setVisibility: setSearchVisibility,
|
|
@@ -18389,11 +18390,11 @@ function OrganizationMembersView() {
|
|
|
18389
18390
|
const queryClient = (0, import_react_query15.useQueryClient)();
|
|
18390
18391
|
const transport = (0, import_connect_query36.useTransport)();
|
|
18391
18392
|
const organizationId = organization?.id || "";
|
|
18392
|
-
const [assignRoleConfig, setAssignRoleConfig] = (0,
|
|
18393
|
-
const [removeMemberConfig, setRemoveMemberConfig] = (0,
|
|
18393
|
+
const [assignRoleConfig, setAssignRoleConfig] = (0, import_react52.useState)({ isOpen: false, user: null });
|
|
18394
|
+
const [removeMemberConfig, setRemoveMemberConfig] = (0, import_react52.useState)({ isOpen: false, user: null });
|
|
18394
18395
|
const title = `Members | ${organization?.title} | Organizations`;
|
|
18395
|
-
const [tableQuery, setTableQuery] = (0,
|
|
18396
|
-
const computedQuery = (0,
|
|
18396
|
+
const [tableQuery, setTableQuery] = (0, import_react52.useState)(INITIAL_QUERY5);
|
|
18397
|
+
const computedQuery = (0, import_react52.useMemo)(() => {
|
|
18397
18398
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS2);
|
|
18398
18399
|
return {
|
|
18399
18400
|
...tempQuery,
|
|
@@ -18431,7 +18432,7 @@ function OrganizationMembersView() {
|
|
|
18431
18432
|
await fetchNextPage();
|
|
18432
18433
|
}
|
|
18433
18434
|
};
|
|
18434
|
-
(0,
|
|
18435
|
+
(0, import_react52.useEffect)(() => {
|
|
18435
18436
|
setSearchVisibility(true);
|
|
18436
18437
|
return () => {
|
|
18437
18438
|
onSearchChange("");
|
|
@@ -18529,8 +18530,8 @@ function OrganizationMembersView() {
|
|
|
18529
18530
|
// admin/views/organizations/details/projects/index.tsx
|
|
18530
18531
|
var import_apsara96 = require("@raystack/apsara");
|
|
18531
18532
|
|
|
18532
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18533
|
-
var digest61 = "
|
|
18533
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-8nQZE03MxIdr/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
18534
|
+
var digest61 = "957cb6c09831de7832c09337820e1a9d20a9a3cace52313e7bd27f7439a136aa";
|
|
18534
18535
|
var css61 = `._container_1rf4u_1 {
|
|
18535
18536
|
width: 100%;
|
|
18536
18537
|
}
|
|
@@ -18587,13 +18588,13 @@ var css61 = `._container_1rf4u_1 {
|
|
|
18587
18588
|
var projects_module_css_default = { "container": "_container_1rf4u_1", "title-column": "_title-column_1rf4u_5", "titleColumn": "_title-column_1rf4u_5", "empty-state": "_empty-state_1rf4u_9", "emptyState": "_empty-state_1rf4u_9", "empty-state-subheading": "_empty-state-subheading_1rf4u_13", "emptyStateSubheading": "_empty-state-subheading_1rf4u_13", "table": "_table_1rf4u_18", "table-wrapper": "_table-wrapper_1rf4u_23", "tableWrapper": "_table-wrapper_1rf4u_23", "table-header": "_table-header_1rf4u_29", "tableHeader": "_table-header_1rf4u_29", "table-action-column": "_table-action-column_1rf4u_34", "tableActionColumn": "_table-action-column_1rf4u_34", "flex1": "_flex1_1rf4u_39" };
|
|
18588
18589
|
|
|
18589
18590
|
// admin/views/organizations/details/projects/index.tsx
|
|
18590
|
-
var
|
|
18591
|
+
var import_react57 = require("react");
|
|
18591
18592
|
|
|
18592
18593
|
// admin/views/organizations/details/projects/columns.tsx
|
|
18593
18594
|
var import_apsara90 = require("@raystack/apsara");
|
|
18594
18595
|
|
|
18595
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18596
|
-
var digest62 = "
|
|
18596
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-T3Sl627hmzgT/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
18597
|
+
var digest62 = "2ffbffe93514a105fde6ffd167f86066a11a5b2a06f2ec8835c378400b497572";
|
|
18597
18598
|
var css62 = `._container_1rf4u_1 {
|
|
18598
18599
|
width: 100%;
|
|
18599
18600
|
}
|
|
@@ -18769,10 +18770,10 @@ function RenameProjectDialog({
|
|
|
18769
18770
|
}
|
|
18770
18771
|
|
|
18771
18772
|
// admin/views/organizations/details/projects/columns.tsx
|
|
18772
|
-
var
|
|
18773
|
+
var import_react54 = require("react");
|
|
18773
18774
|
|
|
18774
18775
|
// admin/views/organizations/details/projects/use-add-project-members.tsx
|
|
18775
|
-
var
|
|
18776
|
+
var import_react53 = require("react");
|
|
18776
18777
|
var import_apsara89 = require("@raystack/apsara");
|
|
18777
18778
|
var import_connect_query38 = require("@connectrpc/connect-query");
|
|
18778
18779
|
var import_frontier42 = require("@raystack/proton/frontier");
|
|
@@ -18780,8 +18781,8 @@ var import_protobuf25 = require("@bufbuild/protobuf");
|
|
|
18780
18781
|
function useAddProjectMembers({ projectId }) {
|
|
18781
18782
|
const t = useTerminology();
|
|
18782
18783
|
const memberLabel = t.member({ case: "capital" });
|
|
18783
|
-
const { orgMembersMap } = (0,
|
|
18784
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
18784
|
+
const { orgMembersMap } = (0, import_react53.useContext)(OrganizationContext);
|
|
18785
|
+
const [searchQuery, setSearchQuery] = (0, import_react53.useState)("");
|
|
18785
18786
|
const { data: projectMembers, isLoading, refetch } = (0, import_connect_query38.useQuery)(
|
|
18786
18787
|
import_frontier42.FrontierServiceQueries.listProjectUsers,
|
|
18787
18788
|
(0, import_protobuf25.create)(import_frontier42.ListProjectUsersRequestSchema, { id: projectId }),
|
|
@@ -18790,7 +18791,7 @@ function useAddProjectMembers({ projectId }) {
|
|
|
18790
18791
|
select: (data) => data?.users || []
|
|
18791
18792
|
}
|
|
18792
18793
|
);
|
|
18793
|
-
const nonMembers = (0,
|
|
18794
|
+
const nonMembers = (0, import_react53.useMemo)(() => {
|
|
18794
18795
|
if (!projectMembers)
|
|
18795
18796
|
return [];
|
|
18796
18797
|
const memberSet = new Set(projectMembers.map((member) => member.id));
|
|
@@ -18800,40 +18801,53 @@ function useAddProjectMembers({ projectId }) {
|
|
|
18800
18801
|
return aName < bName ? -1 : 1;
|
|
18801
18802
|
});
|
|
18802
18803
|
}, [projectMembers, orgMembersMap]);
|
|
18803
|
-
const eligibleMembers = (0,
|
|
18804
|
+
const eligibleMembers = (0, import_react53.useMemo)(() => {
|
|
18804
18805
|
return searchQuery ? nonMembers.filter((member) => {
|
|
18805
18806
|
const name = member.title || member.email || "";
|
|
18806
18807
|
return name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
18807
18808
|
}) : nonMembers;
|
|
18808
18809
|
}, [nonMembers, searchQuery]);
|
|
18809
|
-
const {
|
|
18810
|
-
import_frontier42.FrontierServiceQueries.
|
|
18810
|
+
const { data: rolesData } = (0, import_connect_query38.useQuery)(
|
|
18811
|
+
import_frontier42.FrontierServiceQueries.listRoles,
|
|
18812
|
+
(0, import_protobuf25.create)(import_frontier42.ListRolesRequestSchema, {
|
|
18813
|
+
state: "enabled",
|
|
18814
|
+
scopes: [SCOPES.PROJECT]
|
|
18815
|
+
}),
|
|
18816
|
+
{ enabled: !!projectId }
|
|
18817
|
+
);
|
|
18818
|
+
const viewerRoleId = (0, import_react53.useMemo)(
|
|
18819
|
+
() => rolesData?.roles?.find((r) => r.name === DEFAULT_ROLES.PROJECT_VIEWER)?.id ?? "",
|
|
18820
|
+
[rolesData]
|
|
18811
18821
|
);
|
|
18812
|
-
const
|
|
18822
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query38.useMutation)(
|
|
18823
|
+
import_frontier42.FrontierServiceQueries.setProjectMemberRole
|
|
18824
|
+
);
|
|
18825
|
+
const addMember = (0, import_react53.useCallback)(
|
|
18813
18826
|
async (userId) => {
|
|
18814
|
-
if (!userId || !projectId)
|
|
18827
|
+
if (!userId || !projectId || !viewerRoleId)
|
|
18815
18828
|
return;
|
|
18816
18829
|
try {
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
principal,
|
|
18824
|
-
resource
|
|
18825
|
-
}
|
|
18830
|
+
await setProjectMemberRole(
|
|
18831
|
+
(0, import_protobuf25.create)(import_frontier42.SetProjectMemberRoleRequestSchema, {
|
|
18832
|
+
projectId,
|
|
18833
|
+
principalId: userId,
|
|
18834
|
+
principalType: SCOPES.USER,
|
|
18835
|
+
roleId: viewerRoleId
|
|
18826
18836
|
})
|
|
18827
18837
|
);
|
|
18828
18838
|
import_apsara89.toast.success(`${memberLabel} added`);
|
|
18829
18839
|
await refetch();
|
|
18830
18840
|
return projectMembers;
|
|
18831
18841
|
} catch (error) {
|
|
18832
|
-
|
|
18833
|
-
|
|
18842
|
+
handleConnectError(error, {
|
|
18843
|
+
AlreadyExists: () => import_apsara89.toast.error(`${memberLabel} already exists in this project`),
|
|
18844
|
+
PermissionDenied: () => import_apsara89.toast.error("You don't have permission to perform this action"),
|
|
18845
|
+
InvalidArgument: (err) => import_apsara89.toast.error("Invalid input", { description: err.message }),
|
|
18846
|
+
Default: (err) => import_apsara89.toast.error("Something went wrong", { description: err.message })
|
|
18847
|
+
});
|
|
18834
18848
|
}
|
|
18835
18849
|
},
|
|
18836
|
-
[projectId,
|
|
18850
|
+
[projectId, setProjectMemberRole, refetch, projectMembers, memberLabel, viewerRoleId]
|
|
18837
18851
|
);
|
|
18838
18852
|
return {
|
|
18839
18853
|
isLoading,
|
|
@@ -18943,8 +18957,8 @@ function ProjectActions({
|
|
|
18943
18957
|
project,
|
|
18944
18958
|
handleProjectUpdate
|
|
18945
18959
|
}) {
|
|
18946
|
-
const [open, setOpen] = (0,
|
|
18947
|
-
const [isRenameDialogOpen, setIsRenameDialogOpen] = (0,
|
|
18960
|
+
const [open, setOpen] = (0, import_react54.useState)(false);
|
|
18961
|
+
const [isRenameDialogOpen, setIsRenameDialogOpen] = (0, import_react54.useState)(false);
|
|
18948
18962
|
const preventClickBubbling = (e) => {
|
|
18949
18963
|
e.stopPropagation();
|
|
18950
18964
|
};
|
|
@@ -19081,93 +19095,92 @@ var import_connect_query42 = require("@connectrpc/connect-query");
|
|
|
19081
19095
|
|
|
19082
19096
|
// admin/views/organizations/details/projects/members/index.tsx
|
|
19083
19097
|
var import_apsara95 = require("@raystack/apsara");
|
|
19084
|
-
var
|
|
19098
|
+
var import_react56 = require("react");
|
|
19085
19099
|
var import_frontier45 = require("@raystack/proton/frontier");
|
|
19086
19100
|
var import_protobuf28 = require("@bufbuild/protobuf");
|
|
19087
19101
|
var import_connect_query41 = require("@connectrpc/connect-query");
|
|
19088
19102
|
var import_hooks4 = require("@raystack/apsara/hooks");
|
|
19089
19103
|
|
|
19090
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19091
|
-
var digest63 = "
|
|
19092
|
-
var css63 = `.
|
|
19104
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-nNslU2ps5Bo7/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19105
|
+
var digest63 = "16fecd361112b9806f30dcc6a53e4f46045b370bbcf207cc23b6890993cb3d13";
|
|
19106
|
+
var css63 = `._flex1_1k2kc_1 {
|
|
19093
19107
|
flex: 1;
|
|
19094
19108
|
}
|
|
19095
19109
|
|
|
19096
|
-
._dialog-
|
|
19110
|
+
._dialog-content_1k2kc_5 {
|
|
19097
19111
|
height: 70vh;
|
|
19098
19112
|
width: 80vw;
|
|
19099
19113
|
}
|
|
19100
19114
|
|
|
19101
|
-
._dialog-
|
|
19115
|
+
._dialog-body_1k2kc_10 {
|
|
19102
19116
|
height: 100%;
|
|
19103
19117
|
}
|
|
19104
19118
|
|
|
19105
|
-
._empty-
|
|
19119
|
+
._empty-state_1k2kc_14 {
|
|
19106
19120
|
height: 100%;
|
|
19107
19121
|
}
|
|
19108
19122
|
|
|
19109
|
-
._empty-state-
|
|
19123
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19110
19124
|
max-width: 360px;
|
|
19111
19125
|
text-wrap: auto;
|
|
19112
19126
|
}
|
|
19113
19127
|
|
|
19114
|
-
.
|
|
19128
|
+
._table_1k2kc_23 {
|
|
19115
19129
|
width: 100%;
|
|
19116
|
-
height: 100%;
|
|
19117
19130
|
table-layout: fixed;
|
|
19118
19131
|
}
|
|
19119
19132
|
|
|
19120
|
-
._table-
|
|
19133
|
+
._table-wrapper_1k2kc_28 {
|
|
19121
19134
|
/* Toolbar height */
|
|
19122
19135
|
max-height: calc(100% - 90px);
|
|
19123
19136
|
overflow: scroll;
|
|
19124
19137
|
}
|
|
19125
19138
|
|
|
19126
|
-
._table-
|
|
19139
|
+
._table-header_1k2kc_34 {
|
|
19127
19140
|
/* position: relative; */
|
|
19128
19141
|
z-index: 2;
|
|
19129
19142
|
}
|
|
19130
19143
|
|
|
19131
|
-
._table-
|
|
19144
|
+
._table-search_1k2kc_39 {
|
|
19132
19145
|
max-width: 360px;
|
|
19133
19146
|
}
|
|
19134
19147
|
|
|
19135
|
-
._table-content-
|
|
19148
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19136
19149
|
height: 100%;
|
|
19137
19150
|
}
|
|
19138
19151
|
|
|
19139
|
-
._table-action-
|
|
19152
|
+
._table-action-column_1k2kc_47 {
|
|
19140
19153
|
width: 24px;
|
|
19141
19154
|
}
|
|
19142
19155
|
|
|
19143
|
-
._table-action-
|
|
19156
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19144
19157
|
z-index: 10000;
|
|
19145
19158
|
min-width: 150px;
|
|
19146
19159
|
}
|
|
19147
19160
|
|
|
19148
|
-
._action-dialog-
|
|
19161
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19149
19162
|
z-index: 10001;
|
|
19150
19163
|
}
|
|
19151
19164
|
|
|
19152
|
-
._action-dialog-
|
|
19165
|
+
._action-dialog-content_1k2kc_60 {
|
|
19153
19166
|
z-index: 10002;
|
|
19154
19167
|
}
|
|
19155
19168
|
|
|
19156
|
-
._add-member-
|
|
19169
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19157
19170
|
width: 240px;
|
|
19158
19171
|
/* position: relative; */
|
|
19159
19172
|
}
|
|
19160
19173
|
|
|
19161
|
-
._add-member-dropdown-
|
|
19174
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19162
19175
|
width: 100%;
|
|
19163
19176
|
}
|
|
19164
|
-
|
|
19177
|
+
|
|
19178
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19165
19179
|
max-width: 100%;
|
|
19166
19180
|
overflow: hidden;
|
|
19167
19181
|
text-overflow: ellipsis;
|
|
19168
19182
|
white-space: nowrap;
|
|
19169
|
-
}
|
|
19170
|
-
`;
|
|
19183
|
+
}`;
|
|
19171
19184
|
(function() {
|
|
19172
19185
|
if (typeof document === "undefined") {
|
|
19173
19186
|
return;
|
|
@@ -19179,89 +19192,88 @@ var css63 = `._flex1_nxqqi_1 {
|
|
|
19179
19192
|
document.head.appendChild(el);
|
|
19180
19193
|
}
|
|
19181
19194
|
})();
|
|
19182
|
-
var members_module_css_default3 = { "flex1": "
|
|
19195
|
+
var members_module_css_default3 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19183
19196
|
|
|
19184
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19185
|
-
var digest64 = "
|
|
19186
|
-
var css64 = `.
|
|
19197
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-a3WwD2YL7Tfq/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19198
|
+
var digest64 = "95d929d2aee56a5604871321ff48663cccc7388e4d97954dfb7817547118cd04";
|
|
19199
|
+
var css64 = `._flex1_1k2kc_1 {
|
|
19187
19200
|
flex: 1;
|
|
19188
19201
|
}
|
|
19189
19202
|
|
|
19190
|
-
._dialog-
|
|
19203
|
+
._dialog-content_1k2kc_5 {
|
|
19191
19204
|
height: 70vh;
|
|
19192
19205
|
width: 80vw;
|
|
19193
19206
|
}
|
|
19194
19207
|
|
|
19195
|
-
._dialog-
|
|
19208
|
+
._dialog-body_1k2kc_10 {
|
|
19196
19209
|
height: 100%;
|
|
19197
19210
|
}
|
|
19198
19211
|
|
|
19199
|
-
._empty-
|
|
19212
|
+
._empty-state_1k2kc_14 {
|
|
19200
19213
|
height: 100%;
|
|
19201
19214
|
}
|
|
19202
19215
|
|
|
19203
|
-
._empty-state-
|
|
19216
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19204
19217
|
max-width: 360px;
|
|
19205
19218
|
text-wrap: auto;
|
|
19206
19219
|
}
|
|
19207
19220
|
|
|
19208
|
-
.
|
|
19221
|
+
._table_1k2kc_23 {
|
|
19209
19222
|
width: 100%;
|
|
19210
|
-
height: 100%;
|
|
19211
19223
|
table-layout: fixed;
|
|
19212
19224
|
}
|
|
19213
19225
|
|
|
19214
|
-
._table-
|
|
19226
|
+
._table-wrapper_1k2kc_28 {
|
|
19215
19227
|
/* Toolbar height */
|
|
19216
19228
|
max-height: calc(100% - 90px);
|
|
19217
19229
|
overflow: scroll;
|
|
19218
19230
|
}
|
|
19219
19231
|
|
|
19220
|
-
._table-
|
|
19232
|
+
._table-header_1k2kc_34 {
|
|
19221
19233
|
/* position: relative; */
|
|
19222
19234
|
z-index: 2;
|
|
19223
19235
|
}
|
|
19224
19236
|
|
|
19225
|
-
._table-
|
|
19237
|
+
._table-search_1k2kc_39 {
|
|
19226
19238
|
max-width: 360px;
|
|
19227
19239
|
}
|
|
19228
19240
|
|
|
19229
|
-
._table-content-
|
|
19241
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19230
19242
|
height: 100%;
|
|
19231
19243
|
}
|
|
19232
19244
|
|
|
19233
|
-
._table-action-
|
|
19245
|
+
._table-action-column_1k2kc_47 {
|
|
19234
19246
|
width: 24px;
|
|
19235
19247
|
}
|
|
19236
19248
|
|
|
19237
|
-
._table-action-
|
|
19249
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19238
19250
|
z-index: 10000;
|
|
19239
19251
|
min-width: 150px;
|
|
19240
19252
|
}
|
|
19241
19253
|
|
|
19242
|
-
._action-dialog-
|
|
19254
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19243
19255
|
z-index: 10001;
|
|
19244
19256
|
}
|
|
19245
19257
|
|
|
19246
|
-
._action-dialog-
|
|
19258
|
+
._action-dialog-content_1k2kc_60 {
|
|
19247
19259
|
z-index: 10002;
|
|
19248
19260
|
}
|
|
19249
19261
|
|
|
19250
|
-
._add-member-
|
|
19262
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19251
19263
|
width: 240px;
|
|
19252
19264
|
/* position: relative; */
|
|
19253
19265
|
}
|
|
19254
19266
|
|
|
19255
|
-
._add-member-dropdown-
|
|
19267
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19256
19268
|
width: 100%;
|
|
19257
19269
|
}
|
|
19258
|
-
|
|
19270
|
+
|
|
19271
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19259
19272
|
max-width: 100%;
|
|
19260
19273
|
overflow: hidden;
|
|
19261
19274
|
text-overflow: ellipsis;
|
|
19262
19275
|
white-space: nowrap;
|
|
19263
|
-
}
|
|
19264
|
-
`;
|
|
19276
|
+
}`;
|
|
19265
19277
|
(function() {
|
|
19266
19278
|
if (typeof document === "undefined") {
|
|
19267
19279
|
return;
|
|
@@ -19273,7 +19285,7 @@ var css64 = `._flex1_nxqqi_1 {
|
|
|
19273
19285
|
document.head.appendChild(el);
|
|
19274
19286
|
}
|
|
19275
19287
|
})();
|
|
19276
|
-
var members_module_css_default4 = { "flex1": "
|
|
19288
|
+
var members_module_css_default4 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19277
19289
|
|
|
19278
19290
|
// admin/views/organizations/details/projects/members/columns.tsx
|
|
19279
19291
|
var import_apsara91 = require("@raystack/apsara");
|
|
@@ -19377,87 +19389,86 @@ var getColumns14 = ({
|
|
|
19377
19389
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19378
19390
|
var import_apsara92 = require("@raystack/apsara");
|
|
19379
19391
|
|
|
19380
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19381
|
-
var digest65 = "
|
|
19382
|
-
var css65 = `.
|
|
19392
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-a71HC5UprVcX/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19393
|
+
var digest65 = "c2a79953e9cd5cd60716bd3fb0141aae8f8ac80b07769d36055192ffdd5775bd";
|
|
19394
|
+
var css65 = `._flex1_1k2kc_1 {
|
|
19383
19395
|
flex: 1;
|
|
19384
19396
|
}
|
|
19385
19397
|
|
|
19386
|
-
._dialog-
|
|
19398
|
+
._dialog-content_1k2kc_5 {
|
|
19387
19399
|
height: 70vh;
|
|
19388
19400
|
width: 80vw;
|
|
19389
19401
|
}
|
|
19390
19402
|
|
|
19391
|
-
._dialog-
|
|
19403
|
+
._dialog-body_1k2kc_10 {
|
|
19392
19404
|
height: 100%;
|
|
19393
19405
|
}
|
|
19394
19406
|
|
|
19395
|
-
._empty-
|
|
19407
|
+
._empty-state_1k2kc_14 {
|
|
19396
19408
|
height: 100%;
|
|
19397
19409
|
}
|
|
19398
19410
|
|
|
19399
|
-
._empty-state-
|
|
19411
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19400
19412
|
max-width: 360px;
|
|
19401
19413
|
text-wrap: auto;
|
|
19402
19414
|
}
|
|
19403
19415
|
|
|
19404
|
-
.
|
|
19416
|
+
._table_1k2kc_23 {
|
|
19405
19417
|
width: 100%;
|
|
19406
|
-
height: 100%;
|
|
19407
19418
|
table-layout: fixed;
|
|
19408
19419
|
}
|
|
19409
19420
|
|
|
19410
|
-
._table-
|
|
19421
|
+
._table-wrapper_1k2kc_28 {
|
|
19411
19422
|
/* Toolbar height */
|
|
19412
19423
|
max-height: calc(100% - 90px);
|
|
19413
19424
|
overflow: scroll;
|
|
19414
19425
|
}
|
|
19415
19426
|
|
|
19416
|
-
._table-
|
|
19427
|
+
._table-header_1k2kc_34 {
|
|
19417
19428
|
/* position: relative; */
|
|
19418
19429
|
z-index: 2;
|
|
19419
19430
|
}
|
|
19420
19431
|
|
|
19421
|
-
._table-
|
|
19432
|
+
._table-search_1k2kc_39 {
|
|
19422
19433
|
max-width: 360px;
|
|
19423
19434
|
}
|
|
19424
19435
|
|
|
19425
|
-
._table-content-
|
|
19436
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19426
19437
|
height: 100%;
|
|
19427
19438
|
}
|
|
19428
19439
|
|
|
19429
|
-
._table-action-
|
|
19440
|
+
._table-action-column_1k2kc_47 {
|
|
19430
19441
|
width: 24px;
|
|
19431
19442
|
}
|
|
19432
19443
|
|
|
19433
|
-
._table-action-
|
|
19444
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19434
19445
|
z-index: 10000;
|
|
19435
19446
|
min-width: 150px;
|
|
19436
19447
|
}
|
|
19437
19448
|
|
|
19438
|
-
._action-dialog-
|
|
19449
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19439
19450
|
z-index: 10001;
|
|
19440
19451
|
}
|
|
19441
19452
|
|
|
19442
|
-
._action-dialog-
|
|
19453
|
+
._action-dialog-content_1k2kc_60 {
|
|
19443
19454
|
z-index: 10002;
|
|
19444
19455
|
}
|
|
19445
19456
|
|
|
19446
|
-
._add-member-
|
|
19457
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19447
19458
|
width: 240px;
|
|
19448
19459
|
/* position: relative; */
|
|
19449
19460
|
}
|
|
19450
19461
|
|
|
19451
|
-
._add-member-dropdown-
|
|
19462
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19452
19463
|
width: 100%;
|
|
19453
19464
|
}
|
|
19454
|
-
|
|
19465
|
+
|
|
19466
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19455
19467
|
max-width: 100%;
|
|
19456
19468
|
overflow: hidden;
|
|
19457
19469
|
text-overflow: ellipsis;
|
|
19458
19470
|
white-space: nowrap;
|
|
19459
|
-
}
|
|
19460
|
-
`;
|
|
19471
|
+
}`;
|
|
19461
19472
|
(function() {
|
|
19462
19473
|
if (typeof document === "undefined") {
|
|
19463
19474
|
return;
|
|
@@ -19469,21 +19480,17 @@ var css65 = `._flex1_nxqqi_1 {
|
|
|
19469
19480
|
document.head.appendChild(el);
|
|
19470
19481
|
}
|
|
19471
19482
|
})();
|
|
19472
|
-
var members_module_css_default5 = { "flex1": "
|
|
19483
|
+
var members_module_css_default5 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19473
19484
|
|
|
19474
19485
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19475
|
-
var import_react56 = require("react");
|
|
19476
19486
|
var import_frontier43 = require("@raystack/proton/frontier");
|
|
19477
19487
|
var import_protobuf26 = require("@bufbuild/protobuf");
|
|
19478
19488
|
var import_connect_query39 = require("@connectrpc/connect-query");
|
|
19479
|
-
var import_connect3 = require("@connectrpc/connect");
|
|
19480
19489
|
var import_react_hook_form13 = require("react-hook-form");
|
|
19481
19490
|
var import_zod18 = require("@hookform/resolvers/zod");
|
|
19482
19491
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
19483
19492
|
var formSchema2 = external_exports.object({
|
|
19484
|
-
|
|
19485
|
-
message: "At least one role must be selected"
|
|
19486
|
-
})
|
|
19493
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
19487
19494
|
});
|
|
19488
19495
|
var AssignRole2 = ({
|
|
19489
19496
|
roles = [],
|
|
@@ -19492,84 +19499,36 @@ var AssignRole2 = ({
|
|
|
19492
19499
|
onRoleUpdate,
|
|
19493
19500
|
onClose
|
|
19494
19501
|
}) => {
|
|
19495
|
-
const
|
|
19502
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
19496
19503
|
const {
|
|
19497
19504
|
handleSubmit,
|
|
19498
19505
|
watch,
|
|
19499
19506
|
setValue,
|
|
19500
|
-
formState: { isSubmitting, errors }
|
|
19507
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
19501
19508
|
} = (0, import_react_hook_form13.useForm)({
|
|
19502
19509
|
defaultValues: {
|
|
19503
|
-
|
|
19510
|
+
roleId: currentRoleId
|
|
19504
19511
|
},
|
|
19505
19512
|
resolver: (0, import_zod18.zodResolver)(formSchema2)
|
|
19506
19513
|
});
|
|
19507
|
-
const { mutateAsync:
|
|
19508
|
-
import_frontier43.FrontierServiceQueries.
|
|
19509
|
-
);
|
|
19510
|
-
const { mutateAsync: createPolicy } = (0, import_connect_query39.useMutation)(
|
|
19511
|
-
import_frontier43.FrontierServiceQueries.createPolicy
|
|
19512
|
-
);
|
|
19513
|
-
const roleIds = watch("roleIds");
|
|
19514
|
-
function onCheckedChange(value, roleId) {
|
|
19515
|
-
if (!roleId)
|
|
19516
|
-
return;
|
|
19517
|
-
const currentRoles = new Set(roleIds);
|
|
19518
|
-
if (value) {
|
|
19519
|
-
currentRoles.add(roleId);
|
|
19520
|
-
} else {
|
|
19521
|
-
currentRoles.delete(roleId);
|
|
19522
|
-
}
|
|
19523
|
-
setValue("roleIds", currentRoles);
|
|
19524
|
-
}
|
|
19525
|
-
const checkRole = (0, import_react56.useCallback)(
|
|
19526
|
-
(roleId) => {
|
|
19527
|
-
if (!roleId)
|
|
19528
|
-
return false;
|
|
19529
|
-
return roleIds?.has(roleId) || false;
|
|
19530
|
-
},
|
|
19531
|
-
[roleIds]
|
|
19514
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query39.useMutation)(
|
|
19515
|
+
import_frontier43.FrontierServiceQueries.setProjectMemberRole
|
|
19532
19516
|
);
|
|
19517
|
+
const selectedRoleId = watch("roleId");
|
|
19533
19518
|
const onSubmit = async (data) => {
|
|
19534
19519
|
try {
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
(0, import_protobuf26.create)(import_frontier43.ListPoliciesRequestSchema, {
|
|
19520
|
+
await setProjectMemberRole(
|
|
19521
|
+
(0, import_protobuf26.create)(import_frontier43.SetProjectMemberRoleRequestSchema, {
|
|
19538
19522
|
projectId,
|
|
19539
|
-
|
|
19523
|
+
principalId: user?.id || "",
|
|
19524
|
+
principalType: SCOPES.USER,
|
|
19525
|
+
roleId: data.roleId
|
|
19540
19526
|
})
|
|
19541
19527
|
);
|
|
19542
|
-
const policies = policiesResp.policies || [];
|
|
19543
|
-
const removedRolesPolicies = policies.filter(
|
|
19544
|
-
(policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
|
|
19545
|
-
);
|
|
19546
|
-
await Promise.all(
|
|
19547
|
-
removedRolesPolicies.map(
|
|
19548
|
-
(policy) => deletePolicy(
|
|
19549
|
-
(0, import_protobuf26.create)(import_frontier43.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
19550
|
-
)
|
|
19551
|
-
)
|
|
19552
|
-
);
|
|
19553
|
-
const resource = `app/project:${projectId}`;
|
|
19554
|
-
const principal = `app/user:${user?.id}`;
|
|
19555
|
-
const assignedRolesArr = Array.from(data.roleIds);
|
|
19556
|
-
await Promise.all(
|
|
19557
|
-
assignedRolesArr.map(
|
|
19558
|
-
(roleId) => createPolicy(
|
|
19559
|
-
(0, import_protobuf26.create)(import_frontier43.CreatePolicyRequestSchema, {
|
|
19560
|
-
body: {
|
|
19561
|
-
roleId,
|
|
19562
|
-
resource,
|
|
19563
|
-
principal
|
|
19564
|
-
}
|
|
19565
|
-
})
|
|
19566
|
-
)
|
|
19567
|
-
)
|
|
19568
|
-
);
|
|
19569
19528
|
if (onRoleUpdate) {
|
|
19570
19529
|
onRoleUpdate({
|
|
19571
19530
|
...user,
|
|
19572
|
-
roleIds:
|
|
19531
|
+
roleIds: [data.roleId]
|
|
19573
19532
|
});
|
|
19574
19533
|
}
|
|
19575
19534
|
import_apsara92.toast.success("Role assigned successfully");
|
|
@@ -19595,7 +19554,7 @@ var AssignRole2 = ({
|
|
|
19595
19554
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Flex, { direction: "column", gap: 4, children: [
|
|
19596
19555
|
roles.map((role) => {
|
|
19597
19556
|
const htmlId = `role-${role.id}`;
|
|
19598
|
-
const checked =
|
|
19557
|
+
const checked = selectedRoleId === role.id;
|
|
19599
19558
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Flex, { gap: 3, children: [
|
|
19600
19559
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
19601
19560
|
import_apsara92.Checkbox,
|
|
@@ -19603,13 +19562,15 @@ var AssignRole2 = ({
|
|
|
19603
19562
|
id: htmlId,
|
|
19604
19563
|
"data-test-id": `role-checkbox-${role.id}`,
|
|
19605
19564
|
checked,
|
|
19606
|
-
onCheckedChange: (
|
|
19565
|
+
onCheckedChange: () => setValue("roleId", role.id || "", {
|
|
19566
|
+
shouldDirty: true
|
|
19567
|
+
})
|
|
19607
19568
|
}
|
|
19608
19569
|
),
|
|
19609
19570
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_apsara92.Label, { htmlFor: htmlId, children: role.title })
|
|
19610
19571
|
] }, role.id);
|
|
19611
19572
|
}),
|
|
19612
|
-
errors.
|
|
19573
|
+
errors.roleId && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_apsara92.Text, { variant: "danger", children: errors.roleId.message })
|
|
19613
19574
|
] }) })
|
|
19614
19575
|
] }) }),
|
|
19615
19576
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_apsara92.Dialog.Footer, { children: [
|
|
@@ -19627,6 +19588,7 @@ var AssignRole2 = ({
|
|
|
19627
19588
|
import_apsara92.Button,
|
|
19628
19589
|
{
|
|
19629
19590
|
type: "submit",
|
|
19591
|
+
disabled: !isDirty2,
|
|
19630
19592
|
"data-test-id": "assign-role-update-button",
|
|
19631
19593
|
loading: isSubmitting,
|
|
19632
19594
|
loaderText: "Updating...",
|
|
@@ -19641,93 +19603,91 @@ var AssignRole2 = ({
|
|
|
19641
19603
|
};
|
|
19642
19604
|
|
|
19643
19605
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19644
|
-
var
|
|
19606
|
+
var import_react55 = require("react");
|
|
19645
19607
|
var import_frontier44 = require("@raystack/proton/frontier");
|
|
19646
19608
|
var import_protobuf27 = require("@bufbuild/protobuf");
|
|
19647
19609
|
var import_connect_query40 = require("@connectrpc/connect-query");
|
|
19648
|
-
var import_connect4 = require("@connectrpc/connect");
|
|
19649
19610
|
|
|
19650
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19651
|
-
var digest66 = "
|
|
19652
|
-
var css66 = `.
|
|
19611
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-hh6RZMV3dO3i/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19612
|
+
var digest66 = "0d6005e7227504d9195d335247bc95fd284331cd89b35614635e87a80a35508d";
|
|
19613
|
+
var css66 = `._flex1_1k2kc_1 {
|
|
19653
19614
|
flex: 1;
|
|
19654
19615
|
}
|
|
19655
19616
|
|
|
19656
|
-
._dialog-
|
|
19617
|
+
._dialog-content_1k2kc_5 {
|
|
19657
19618
|
height: 70vh;
|
|
19658
19619
|
width: 80vw;
|
|
19659
19620
|
}
|
|
19660
19621
|
|
|
19661
|
-
._dialog-
|
|
19622
|
+
._dialog-body_1k2kc_10 {
|
|
19662
19623
|
height: 100%;
|
|
19663
19624
|
}
|
|
19664
19625
|
|
|
19665
|
-
._empty-
|
|
19626
|
+
._empty-state_1k2kc_14 {
|
|
19666
19627
|
height: 100%;
|
|
19667
19628
|
}
|
|
19668
19629
|
|
|
19669
|
-
._empty-state-
|
|
19630
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19670
19631
|
max-width: 360px;
|
|
19671
19632
|
text-wrap: auto;
|
|
19672
19633
|
}
|
|
19673
19634
|
|
|
19674
|
-
.
|
|
19635
|
+
._table_1k2kc_23 {
|
|
19675
19636
|
width: 100%;
|
|
19676
|
-
height: 100%;
|
|
19677
19637
|
table-layout: fixed;
|
|
19678
19638
|
}
|
|
19679
19639
|
|
|
19680
|
-
._table-
|
|
19640
|
+
._table-wrapper_1k2kc_28 {
|
|
19681
19641
|
/* Toolbar height */
|
|
19682
19642
|
max-height: calc(100% - 90px);
|
|
19683
19643
|
overflow: scroll;
|
|
19684
19644
|
}
|
|
19685
19645
|
|
|
19686
|
-
._table-
|
|
19646
|
+
._table-header_1k2kc_34 {
|
|
19687
19647
|
/* position: relative; */
|
|
19688
19648
|
z-index: 2;
|
|
19689
19649
|
}
|
|
19690
19650
|
|
|
19691
|
-
._table-
|
|
19651
|
+
._table-search_1k2kc_39 {
|
|
19692
19652
|
max-width: 360px;
|
|
19693
19653
|
}
|
|
19694
19654
|
|
|
19695
|
-
._table-content-
|
|
19655
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19696
19656
|
height: 100%;
|
|
19697
19657
|
}
|
|
19698
19658
|
|
|
19699
|
-
._table-action-
|
|
19659
|
+
._table-action-column_1k2kc_47 {
|
|
19700
19660
|
width: 24px;
|
|
19701
19661
|
}
|
|
19702
19662
|
|
|
19703
|
-
._table-action-
|
|
19663
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19704
19664
|
z-index: 10000;
|
|
19705
19665
|
min-width: 150px;
|
|
19706
19666
|
}
|
|
19707
19667
|
|
|
19708
|
-
._action-dialog-
|
|
19668
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19709
19669
|
z-index: 10001;
|
|
19710
19670
|
}
|
|
19711
19671
|
|
|
19712
|
-
._action-dialog-
|
|
19672
|
+
._action-dialog-content_1k2kc_60 {
|
|
19713
19673
|
z-index: 10002;
|
|
19714
19674
|
}
|
|
19715
19675
|
|
|
19716
|
-
._add-member-
|
|
19676
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19717
19677
|
width: 240px;
|
|
19718
19678
|
/* position: relative; */
|
|
19719
19679
|
}
|
|
19720
19680
|
|
|
19721
|
-
._add-member-dropdown-
|
|
19681
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19722
19682
|
width: 100%;
|
|
19723
19683
|
}
|
|
19724
|
-
|
|
19684
|
+
|
|
19685
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19725
19686
|
max-width: 100%;
|
|
19726
19687
|
overflow: hidden;
|
|
19727
19688
|
text-overflow: ellipsis;
|
|
19728
19689
|
white-space: nowrap;
|
|
19729
|
-
}
|
|
19730
|
-
`;
|
|
19690
|
+
}`;
|
|
19731
19691
|
(function() {
|
|
19732
19692
|
if (typeof document === "undefined") {
|
|
19733
19693
|
return;
|
|
@@ -19739,7 +19699,7 @@ var css66 = `._flex1_nxqqi_1 {
|
|
|
19739
19699
|
document.head.appendChild(el);
|
|
19740
19700
|
}
|
|
19741
19701
|
})();
|
|
19742
|
-
var members_module_css_default6 = { "flex1": "
|
|
19702
|
+
var members_module_css_default6 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19743
19703
|
|
|
19744
19704
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19745
19705
|
var import_apsara93 = require("@raystack/apsara");
|
|
@@ -19751,31 +19711,22 @@ var RemoveMember2 = ({
|
|
|
19751
19711
|
onClose
|
|
19752
19712
|
}) => {
|
|
19753
19713
|
const t = useTerminology();
|
|
19754
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
19755
|
-
const
|
|
19756
|
-
|
|
19757
|
-
import_frontier44.FrontierServiceQueries.deletePolicy
|
|
19714
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react55.useState)(false);
|
|
19715
|
+
const { mutateAsync: removeProjectMember } = (0, import_connect_query40.useMutation)(
|
|
19716
|
+
import_frontier44.FrontierServiceQueries.removeProjectMember
|
|
19758
19717
|
);
|
|
19759
19718
|
async function onSubmit() {
|
|
19760
19719
|
try {
|
|
19761
19720
|
if (!user)
|
|
19762
19721
|
return;
|
|
19763
19722
|
setIsSubmitting(true);
|
|
19764
|
-
|
|
19765
|
-
|
|
19766
|
-
(0, import_protobuf27.create)(import_frontier44.ListPoliciesRequestSchema, {
|
|
19723
|
+
await removeProjectMember(
|
|
19724
|
+
(0, import_protobuf27.create)(import_frontier44.RemoveProjectMemberRequestSchema, {
|
|
19767
19725
|
projectId,
|
|
19768
|
-
|
|
19726
|
+
principalId: user.id,
|
|
19727
|
+
principalType: "app/user"
|
|
19769
19728
|
})
|
|
19770
19729
|
);
|
|
19771
|
-
const policies = policiesResp.policies || [];
|
|
19772
|
-
await Promise.all(
|
|
19773
|
-
policies.map(
|
|
19774
|
-
(policy) => deletePolicy(
|
|
19775
|
-
(0, import_protobuf27.create)(import_frontier44.DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
19776
|
-
)
|
|
19777
|
-
)
|
|
19778
|
-
);
|
|
19779
19730
|
if (onRemove) {
|
|
19780
19731
|
onRemove(user);
|
|
19781
19732
|
}
|
|
@@ -19849,87 +19800,86 @@ var RemoveMember2 = ({
|
|
|
19849
19800
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
19850
19801
|
var import_apsara94 = require("@raystack/apsara");
|
|
19851
19802
|
|
|
19852
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19853
|
-
var digest67 = "
|
|
19854
|
-
var css67 = `.
|
|
19803
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-Tp0GdN8j0i1Q/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19804
|
+
var digest67 = "949d708d6b1a56ea4f0946af3fa9422734380eaa744a8c0c0b5826d79fa93565";
|
|
19805
|
+
var css67 = `._flex1_1k2kc_1 {
|
|
19855
19806
|
flex: 1;
|
|
19856
19807
|
}
|
|
19857
19808
|
|
|
19858
|
-
._dialog-
|
|
19809
|
+
._dialog-content_1k2kc_5 {
|
|
19859
19810
|
height: 70vh;
|
|
19860
19811
|
width: 80vw;
|
|
19861
19812
|
}
|
|
19862
19813
|
|
|
19863
|
-
._dialog-
|
|
19814
|
+
._dialog-body_1k2kc_10 {
|
|
19864
19815
|
height: 100%;
|
|
19865
19816
|
}
|
|
19866
19817
|
|
|
19867
|
-
._empty-
|
|
19818
|
+
._empty-state_1k2kc_14 {
|
|
19868
19819
|
height: 100%;
|
|
19869
19820
|
}
|
|
19870
19821
|
|
|
19871
|
-
._empty-state-
|
|
19822
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19872
19823
|
max-width: 360px;
|
|
19873
19824
|
text-wrap: auto;
|
|
19874
19825
|
}
|
|
19875
19826
|
|
|
19876
|
-
.
|
|
19827
|
+
._table_1k2kc_23 {
|
|
19877
19828
|
width: 100%;
|
|
19878
|
-
height: 100%;
|
|
19879
19829
|
table-layout: fixed;
|
|
19880
19830
|
}
|
|
19881
19831
|
|
|
19882
|
-
._table-
|
|
19832
|
+
._table-wrapper_1k2kc_28 {
|
|
19883
19833
|
/* Toolbar height */
|
|
19884
19834
|
max-height: calc(100% - 90px);
|
|
19885
19835
|
overflow: scroll;
|
|
19886
19836
|
}
|
|
19887
19837
|
|
|
19888
|
-
._table-
|
|
19838
|
+
._table-header_1k2kc_34 {
|
|
19889
19839
|
/* position: relative; */
|
|
19890
19840
|
z-index: 2;
|
|
19891
19841
|
}
|
|
19892
19842
|
|
|
19893
|
-
._table-
|
|
19843
|
+
._table-search_1k2kc_39 {
|
|
19894
19844
|
max-width: 360px;
|
|
19895
19845
|
}
|
|
19896
19846
|
|
|
19897
|
-
._table-content-
|
|
19847
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19898
19848
|
height: 100%;
|
|
19899
19849
|
}
|
|
19900
19850
|
|
|
19901
|
-
._table-action-
|
|
19851
|
+
._table-action-column_1k2kc_47 {
|
|
19902
19852
|
width: 24px;
|
|
19903
19853
|
}
|
|
19904
19854
|
|
|
19905
|
-
._table-action-
|
|
19855
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19906
19856
|
z-index: 10000;
|
|
19907
19857
|
min-width: 150px;
|
|
19908
19858
|
}
|
|
19909
19859
|
|
|
19910
|
-
._action-dialog-
|
|
19860
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19911
19861
|
z-index: 10001;
|
|
19912
19862
|
}
|
|
19913
19863
|
|
|
19914
|
-
._action-dialog-
|
|
19864
|
+
._action-dialog-content_1k2kc_60 {
|
|
19915
19865
|
z-index: 10002;
|
|
19916
19866
|
}
|
|
19917
19867
|
|
|
19918
|
-
._add-member-
|
|
19868
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19919
19869
|
width: 240px;
|
|
19920
19870
|
/* position: relative; */
|
|
19921
19871
|
}
|
|
19922
19872
|
|
|
19923
|
-
._add-member-dropdown-
|
|
19873
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19924
19874
|
width: 100%;
|
|
19925
19875
|
}
|
|
19926
|
-
|
|
19876
|
+
|
|
19877
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19927
19878
|
max-width: 100%;
|
|
19928
19879
|
overflow: hidden;
|
|
19929
19880
|
text-overflow: ellipsis;
|
|
19930
19881
|
white-space: nowrap;
|
|
19931
|
-
}
|
|
19932
|
-
`;
|
|
19882
|
+
}`;
|
|
19933
19883
|
(function() {
|
|
19934
19884
|
if (typeof document === "undefined") {
|
|
19935
19885
|
return;
|
|
@@ -19941,7 +19891,7 @@ var css67 = `._flex1_nxqqi_1 {
|
|
|
19941
19891
|
document.head.appendChild(el);
|
|
19942
19892
|
}
|
|
19943
19893
|
})();
|
|
19944
|
-
var members_module_css_default7 = { "flex1": "
|
|
19894
|
+
var members_module_css_default7 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19945
19895
|
|
|
19946
19896
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
19947
19897
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
@@ -20033,8 +19983,8 @@ var ProjectMembersDialog = ({
|
|
|
20033
19983
|
},
|
|
20034
19984
|
200
|
|
20035
19985
|
);
|
|
20036
|
-
const [assignRoleConfig, setAssignRoleConfig] = (0,
|
|
20037
|
-
const [removeMemberConfig, setRemoveMemberConfig] = (0,
|
|
19986
|
+
const [assignRoleConfig, setAssignRoleConfig] = (0, import_react56.useState)({ isOpen: false, user: null });
|
|
19987
|
+
const [removeMemberConfig, setRemoveMemberConfig] = (0, import_react56.useState)({ isOpen: false, user: null });
|
|
20038
19988
|
const { data: project, isLoading: isProjectLoading, error: projectError } = (0, import_connect_query41.useQuery)(
|
|
20039
19989
|
import_frontier45.FrontierServiceQueries.getProject,
|
|
20040
19990
|
(0, import_protobuf28.create)(import_frontier45.GetProjectRequestSchema, { id: projectId }),
|
|
@@ -20080,7 +20030,7 @@ var ProjectMembersDialog = ({
|
|
|
20080
20030
|
}
|
|
20081
20031
|
);
|
|
20082
20032
|
const data = infiniteData?.pages?.flatMap((page) => page?.projectUsers || []) || [];
|
|
20083
|
-
const onTableQueryChange = (0,
|
|
20033
|
+
const onTableQueryChange = (0, import_react56.useCallback)((query) => {
|
|
20084
20034
|
const updatedQuery = {
|
|
20085
20035
|
...query,
|
|
20086
20036
|
offset: 0,
|
|
@@ -20097,7 +20047,7 @@ var ProjectMembersDialog = ({
|
|
|
20097
20047
|
rqlRequest: updatedRQLRequest
|
|
20098
20048
|
});
|
|
20099
20049
|
}, []);
|
|
20100
|
-
const handleLoadMore = (0,
|
|
20050
|
+
const handleLoadMore = (0, import_react56.useCallback)(async () => {
|
|
20101
20051
|
try {
|
|
20102
20052
|
if (!hasNextPage)
|
|
20103
20053
|
return;
|
|
@@ -20109,25 +20059,25 @@ var ProjectMembersDialog = ({
|
|
|
20109
20059
|
async function refetchMembers() {
|
|
20110
20060
|
await refetch();
|
|
20111
20061
|
}
|
|
20112
|
-
const openAssignRoleDialog = (0,
|
|
20062
|
+
const openAssignRoleDialog = (0, import_react56.useCallback)(
|
|
20113
20063
|
(user) => {
|
|
20114
20064
|
setAssignRoleConfig({ isOpen: true, user });
|
|
20115
20065
|
},
|
|
20116
20066
|
[]
|
|
20117
20067
|
);
|
|
20118
|
-
const closeAssignRoleDialog = (0,
|
|
20068
|
+
const closeAssignRoleDialog = (0, import_react56.useCallback)(() => {
|
|
20119
20069
|
setAssignRoleConfig({ isOpen: false, user: null });
|
|
20120
20070
|
}, []);
|
|
20121
|
-
const openRemoveMemberDialog = (0,
|
|
20071
|
+
const openRemoveMemberDialog = (0, import_react56.useCallback)(
|
|
20122
20072
|
(user) => {
|
|
20123
20073
|
setRemoveMemberConfig({ isOpen: true, user });
|
|
20124
20074
|
},
|
|
20125
20075
|
[]
|
|
20126
20076
|
);
|
|
20127
|
-
const closeRemoveMemberDialog = (0,
|
|
20077
|
+
const closeRemoveMemberDialog = (0, import_react56.useCallback)(() => {
|
|
20128
20078
|
setRemoveMemberConfig({ isOpen: false, user: null });
|
|
20129
20079
|
}, []);
|
|
20130
|
-
const columns = (0,
|
|
20080
|
+
const columns = (0, import_react56.useMemo)(
|
|
20131
20081
|
() => getColumns14({
|
|
20132
20082
|
roles: projectRoles,
|
|
20133
20083
|
handleAssignRoleAction: openAssignRoleDialog,
|
|
@@ -20264,20 +20214,20 @@ var ErrorState2 = () => {
|
|
|
20264
20214
|
};
|
|
20265
20215
|
function OrganizationProjectsView() {
|
|
20266
20216
|
const t = useTerminology();
|
|
20267
|
-
const { organization, search, orgMembersMap, isOrgMembersMapLoading } = (0,
|
|
20217
|
+
const { organization, search, orgMembersMap, isOrgMembersMapLoading } = (0, import_react57.useContext)(OrganizationContext);
|
|
20268
20218
|
const {
|
|
20269
20219
|
onChange: onSearchChange,
|
|
20270
20220
|
setVisibility: setSearchVisibility,
|
|
20271
20221
|
query: searchQuery
|
|
20272
20222
|
} = search;
|
|
20273
20223
|
const organizationId = organization?.id || "";
|
|
20274
|
-
const [memberDialogConfig, setMemberDialogConfig] = (0,
|
|
20224
|
+
const [memberDialogConfig, setMemberDialogConfig] = (0, import_react57.useState)({
|
|
20275
20225
|
open: false,
|
|
20276
20226
|
projectId: ""
|
|
20277
20227
|
});
|
|
20278
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20228
|
+
const [tableQuery, setTableQuery] = (0, import_react57.useState)(INITIAL_QUERY7);
|
|
20279
20229
|
const title = `${t.project({ plural: true, case: "capital" })} | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20280
|
-
const computedQuery = (0,
|
|
20230
|
+
const computedQuery = (0, import_react57.useMemo)(() => {
|
|
20281
20231
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS3);
|
|
20282
20232
|
return {
|
|
20283
20233
|
...tempQuery,
|
|
@@ -20319,7 +20269,7 @@ function OrganizationProjectsView() {
|
|
|
20319
20269
|
function handleProjectUpdate(project) {
|
|
20320
20270
|
refetchOrgProjects();
|
|
20321
20271
|
}
|
|
20322
|
-
(0,
|
|
20272
|
+
(0, import_react57.useEffect)(() => {
|
|
20323
20273
|
setSearchVisibility(true);
|
|
20324
20274
|
return () => {
|
|
20325
20275
|
onSearchChange("");
|
|
@@ -20385,8 +20335,8 @@ function OrganizationProjectsView() {
|
|
|
20385
20335
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20386
20336
|
var import_apsara98 = require("@raystack/apsara");
|
|
20387
20337
|
|
|
20388
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20389
|
-
var digest68 = "
|
|
20338
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-rV0wu8AauM0V/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
20339
|
+
var digest68 = "2900fd3bd75b6ea0505f0add710c73136d89cf223b6c45423216c5f447325561";
|
|
20390
20340
|
var css68 = `._empty-state_ct7gw_1 {
|
|
20391
20341
|
height: 100%;
|
|
20392
20342
|
}
|
|
@@ -20430,10 +20380,10 @@ var css68 = `._empty-state_ct7gw_1 {
|
|
|
20430
20380
|
var invoices_module_css_default3 = { "empty-state": "_empty-state_ct7gw_1", "emptyState": "_empty-state_ct7gw_1", "empty-state-subheading": "_empty-state-subheading_ct7gw_5", "emptyStateSubheading": "_empty-state-subheading_ct7gw_5", "table": "_table_ct7gw_10", "table-wrapper": "_table-wrapper_ct7gw_15", "tableWrapper": "_table-wrapper_ct7gw_15", "table-header": "_table-header_ct7gw_21", "tableHeader": "_table-header_ct7gw_21", "first-column": "_first-column_ct7gw_26", "firstColumn": "_first-column_ct7gw_26" };
|
|
20431
20381
|
|
|
20432
20382
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20433
|
-
var
|
|
20383
|
+
var import_react58 = require("react");
|
|
20434
20384
|
|
|
20435
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20436
|
-
var digest69 = "
|
|
20385
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-Na5PQWUOhVHe/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
20386
|
+
var digest69 = "bcd1ebc47282fefb6fb43a40b6984877013717fa018cb259d19c217c757b92ab";
|
|
20437
20387
|
var css69 = `._empty-state_ct7gw_1 {
|
|
20438
20388
|
height: 100%;
|
|
20439
20389
|
}
|
|
@@ -20599,16 +20549,16 @@ var ErrorState3 = () => {
|
|
|
20599
20549
|
};
|
|
20600
20550
|
function OrganizationInvoicesView() {
|
|
20601
20551
|
const t = useTerminology();
|
|
20602
|
-
const { organization, search } = (0,
|
|
20552
|
+
const { organization, search } = (0, import_react58.useContext)(OrganizationContext);
|
|
20603
20553
|
const organizationId = organization?.id || "";
|
|
20604
20554
|
const {
|
|
20605
20555
|
onChange: onSearchChange,
|
|
20606
20556
|
setVisibility: setSearchVisibility,
|
|
20607
20557
|
query: searchQuery
|
|
20608
20558
|
} = search;
|
|
20609
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20559
|
+
const [tableQuery, setTableQuery] = (0, import_react58.useState)(INITIAL_QUERY8);
|
|
20610
20560
|
const title = `Invoices | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20611
|
-
const computedQuery = (0,
|
|
20561
|
+
const computedQuery = (0, import_react58.useMemo)(() => {
|
|
20612
20562
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS4);
|
|
20613
20563
|
return {
|
|
20614
20564
|
...tempQuery,
|
|
@@ -20624,7 +20574,7 @@ function OrganizationInvoicesView() {
|
|
|
20624
20574
|
hasNextPage,
|
|
20625
20575
|
isError
|
|
20626
20576
|
} = (0, import_connect_query43.useInfiniteQuery)(
|
|
20627
|
-
import_frontier47.
|
|
20577
|
+
import_frontier47.FrontierServiceQueries.searchOrganizationInvoices,
|
|
20628
20578
|
{ id: organizationId, query },
|
|
20629
20579
|
{
|
|
20630
20580
|
enabled: !!organizationId,
|
|
@@ -20651,7 +20601,7 @@ function OrganizationInvoicesView() {
|
|
|
20651
20601
|
await fetchNextPage();
|
|
20652
20602
|
}
|
|
20653
20603
|
};
|
|
20654
|
-
(0,
|
|
20604
|
+
(0, import_react58.useEffect)(() => {
|
|
20655
20605
|
setSearchVisibility(true);
|
|
20656
20606
|
return () => {
|
|
20657
20607
|
onSearchChange("");
|
|
@@ -20694,8 +20644,8 @@ function OrganizationInvoicesView() {
|
|
|
20694
20644
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20695
20645
|
var import_apsara100 = require("@raystack/apsara");
|
|
20696
20646
|
|
|
20697
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20698
|
-
var digest70 = "
|
|
20647
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-leJgaUcJWPmc/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
20648
|
+
var digest70 = "10dbb41fb0170ed1f525126d49c73007f9a48fae9fb5718043c8502f71038d22";
|
|
20699
20649
|
var css70 = `._empty-state_1mf09_1 {
|
|
20700
20650
|
height: 100%;
|
|
20701
20651
|
}
|
|
@@ -20751,12 +20701,12 @@ var tokens_module_css_default = { "empty-state": "_empty-state_1mf09_1", "emptyS
|
|
|
20751
20701
|
|
|
20752
20702
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20753
20703
|
var import_icons7 = require("@raystack/apsara/icons");
|
|
20754
|
-
var
|
|
20704
|
+
var import_react59 = require("react");
|
|
20755
20705
|
var import_frontier48 = require("@raystack/proton/frontier");
|
|
20756
20706
|
var import_connect_query44 = require("@connectrpc/connect-query");
|
|
20757
20707
|
|
|
20758
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20759
|
-
var digest71 = "
|
|
20708
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-QqXRDtfwSFoS/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
20709
|
+
var digest71 = "310541336c592d1e07a24478d17e91814477f26dfaa6200eb9380b55cd1d2ebc";
|
|
20760
20710
|
var css71 = `._empty-state_1mf09_1 {
|
|
20761
20711
|
height: 100%;
|
|
20762
20712
|
}
|
|
@@ -20931,16 +20881,16 @@ var ErrorState4 = () => {
|
|
|
20931
20881
|
};
|
|
20932
20882
|
function OrganizationTokensView() {
|
|
20933
20883
|
const t = useTerminology();
|
|
20934
|
-
const { organization, search } = (0,
|
|
20884
|
+
const { organization, search } = (0, import_react59.useContext)(OrganizationContext);
|
|
20935
20885
|
const organizationId = organization?.id || "";
|
|
20936
20886
|
const {
|
|
20937
20887
|
onChange: onSearchChange,
|
|
20938
20888
|
setVisibility: setSearchVisibility,
|
|
20939
20889
|
query: searchQuery
|
|
20940
20890
|
} = search;
|
|
20941
|
-
const [tableQuery, setTableQuery] = (0,
|
|
20891
|
+
const [tableQuery, setTableQuery] = (0, import_react59.useState)(INITIAL_QUERY9);
|
|
20942
20892
|
const title = `Tokens | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
20943
|
-
const computedQuery = (0,
|
|
20893
|
+
const computedQuery = (0, import_react59.useMemo)(() => {
|
|
20944
20894
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS5);
|
|
20945
20895
|
return {
|
|
20946
20896
|
...tempQuery,
|
|
@@ -20982,14 +20932,14 @@ function OrganizationTokensView() {
|
|
|
20982
20932
|
await fetchNextPage();
|
|
20983
20933
|
}
|
|
20984
20934
|
};
|
|
20985
|
-
(0,
|
|
20935
|
+
(0, import_react59.useEffect)(() => {
|
|
20986
20936
|
setSearchVisibility(true);
|
|
20987
20937
|
return () => {
|
|
20988
20938
|
onSearchChange("");
|
|
20989
20939
|
setSearchVisibility(false);
|
|
20990
20940
|
};
|
|
20991
20941
|
}, [setSearchVisibility, onSearchChange]);
|
|
20992
|
-
const columns = (0,
|
|
20942
|
+
const columns = (0, import_react59.useMemo)(() => getColumns16({ t }), [t]);
|
|
20993
20943
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_apsara100.Flex, { justify: "center", children: [
|
|
20994
20944
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(PageTitle, { title }),
|
|
20995
20945
|
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
@@ -21025,8 +20975,8 @@ function OrganizationTokensView() {
|
|
|
21025
20975
|
// admin/views/organizations/details/apis/index.tsx
|
|
21026
20976
|
var import_apsara103 = require("@raystack/apsara");
|
|
21027
20977
|
|
|
21028
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21029
|
-
var digest72 = "
|
|
20978
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-Z5aPCLBy7D08/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
20979
|
+
var digest72 = "bafbc19f1b114344cea91f8e7afb2a66906c48b5467f70782a1b3b3c291fbcac";
|
|
21030
20980
|
var css72 = `._empty-state_r9k2f_1 {
|
|
21031
20981
|
height: 100%;
|
|
21032
20982
|
}
|
|
@@ -21105,14 +21055,14 @@ var css72 = `._empty-state_r9k2f_1 {
|
|
|
21105
21055
|
var apis_module_css_default = { "empty-state": "_empty-state_r9k2f_1", "emptyState": "_empty-state_r9k2f_1", "empty-state-subheading": "_empty-state-subheading_r9k2f_5", "emptyStateSubheading": "_empty-state-subheading_r9k2f_5", "table": "_table_r9k2f_10", "table-wrapper": "_table-wrapper_r9k2f_15", "tableWrapper": "_table-wrapper_r9k2f_15", "table-header": "_table-header_r9k2f_21", "tableHeader": "_table-header_r9k2f_21", "first-column": "_first-column_r9k2f_26", "firstColumn": "_first-column_r9k2f_26", "details-dialog": "_details-dialog_r9k2f_30", "detailsDialog": "_details-dialog_r9k2f_30", "skeleton": "_skeleton_r9k2f_38", "tab-root": "_tab-root_r9k2f_42", "tabRoot": "_tab-root_r9k2f_42", "tab-content": "_tab-content_r9k2f_47", "tabContent": "_tab-content_r9k2f_47", "list-item": "_list-item_r9k2f_52", "listItem": "_list-item_r9k2f_52", "dialog-body": "_dialog-body_r9k2f_60", "dialogBody": "_dialog-body_r9k2f_60" };
|
|
21106
21056
|
|
|
21107
21057
|
// admin/views/organizations/details/apis/index.tsx
|
|
21108
|
-
var
|
|
21058
|
+
var import_react61 = require("react");
|
|
21109
21059
|
|
|
21110
21060
|
// admin/views/organizations/details/apis/columns.tsx
|
|
21111
21061
|
var import_apsara101 = require("@raystack/apsara");
|
|
21112
21062
|
var import_dayjs16 = __toESM(require("dayjs"));
|
|
21113
21063
|
|
|
21114
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21115
|
-
var digest73 = "
|
|
21064
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-NUFmJ9f0WXnt/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21065
|
+
var digest73 = "f5b667e737b0ed4ede922ad7bd845be631d39a3d125684a4810800c1605d061d";
|
|
21116
21066
|
var css73 = `._empty-state_r9k2f_1 {
|
|
21117
21067
|
height: 100%;
|
|
21118
21068
|
}
|
|
@@ -21236,8 +21186,8 @@ function getColumns17(options) {
|
|
|
21236
21186
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21237
21187
|
var import_apsara102 = require("@raystack/apsara");
|
|
21238
21188
|
|
|
21239
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21240
|
-
var digest74 = "
|
|
21189
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-0cUUZIKWx3ik/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21190
|
+
var digest74 = "e8dd96b24a7d64adef1cd1b8eb49077e79c1c3fd0a14ef64b92ef60db0c8dbbb";
|
|
21241
21191
|
var css74 = `._empty-state_r9k2f_1 {
|
|
21242
21192
|
height: 100%;
|
|
21243
21193
|
}
|
|
@@ -21316,7 +21266,7 @@ var css74 = `._empty-state_r9k2f_1 {
|
|
|
21316
21266
|
var apis_module_css_default3 = { "empty-state": "_empty-state_r9k2f_1", "emptyState": "_empty-state_r9k2f_1", "empty-state-subheading": "_empty-state-subheading_r9k2f_5", "emptyStateSubheading": "_empty-state-subheading_r9k2f_5", "table": "_table_r9k2f_10", "table-wrapper": "_table-wrapper_r9k2f_15", "tableWrapper": "_table-wrapper_r9k2f_15", "table-header": "_table-header_r9k2f_21", "tableHeader": "_table-header_r9k2f_21", "first-column": "_first-column_r9k2f_26", "firstColumn": "_first-column_r9k2f_26", "details-dialog": "_details-dialog_r9k2f_30", "detailsDialog": "_details-dialog_r9k2f_30", "skeleton": "_skeleton_r9k2f_38", "tab-root": "_tab-root_r9k2f_42", "tabRoot": "_tab-root_r9k2f_42", "tab-content": "_tab-content_r9k2f_47", "tabContent": "_tab-content_r9k2f_47", "list-item": "_list-item_r9k2f_52", "listItem": "_list-item_r9k2f_52", "dialog-body": "_dialog-body_r9k2f_60", "dialogBody": "_dialog-body_r9k2f_60" };
|
|
21317
21267
|
|
|
21318
21268
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21319
|
-
var
|
|
21269
|
+
var import_react60 = require("react");
|
|
21320
21270
|
var import_connect_query45 = require("@connectrpc/connect-query");
|
|
21321
21271
|
var import_frontier49 = require("@raystack/proton/frontier");
|
|
21322
21272
|
var import_protobuf29 = require("@bufbuild/protobuf");
|
|
@@ -21327,14 +21277,14 @@ var ServiceUserDetailsDialog = ({
|
|
|
21327
21277
|
}) => {
|
|
21328
21278
|
const t = useTerminology();
|
|
21329
21279
|
const { id = "", orgId = "", title = "" } = serviceUser || {};
|
|
21330
|
-
const projectsRequest = (0,
|
|
21280
|
+
const projectsRequest = (0, import_react60.useMemo)(
|
|
21331
21281
|
() => (0, import_protobuf29.create)(import_frontier49.ListServiceUserProjectsRequestSchema, {
|
|
21332
21282
|
orgId,
|
|
21333
21283
|
id
|
|
21334
21284
|
}),
|
|
21335
21285
|
[orgId, id]
|
|
21336
21286
|
);
|
|
21337
|
-
const tokensRequest = (0,
|
|
21287
|
+
const tokensRequest = (0, import_react60.useMemo)(
|
|
21338
21288
|
() => (0, import_protobuf29.create)(import_frontier49.ListServiceUserTokensRequestSchema, {
|
|
21339
21289
|
orgId,
|
|
21340
21290
|
id
|
|
@@ -21357,7 +21307,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21357
21307
|
enabled: !!orgId && !!id,
|
|
21358
21308
|
select: (data) => data?.tokens || []
|
|
21359
21309
|
});
|
|
21360
|
-
(0,
|
|
21310
|
+
(0, import_react60.useEffect)(() => {
|
|
21361
21311
|
if (projectError) {
|
|
21362
21312
|
import_apsara102.toast.error("Something went wrong", {
|
|
21363
21313
|
description: "Unable to fetch projects"
|
|
@@ -21371,7 +21321,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21371
21321
|
console.error("Unable to fetch tokens:", tokenError);
|
|
21372
21322
|
}
|
|
21373
21323
|
}, [projectError, tokenError]);
|
|
21374
|
-
const onOpenChange = (0,
|
|
21324
|
+
const onOpenChange = (0, import_react60.useCallback)(
|
|
21375
21325
|
(val) => {
|
|
21376
21326
|
if (!val) {
|
|
21377
21327
|
onClose();
|
|
@@ -21482,15 +21432,15 @@ var TRANSFORM_OPTIONS6 = {
|
|
|
21482
21432
|
};
|
|
21483
21433
|
function OrganizationApisView() {
|
|
21484
21434
|
const t = useTerminology();
|
|
21485
|
-
const { organization, search } = (0,
|
|
21435
|
+
const { organization, search } = (0, import_react61.useContext)(OrganizationContext);
|
|
21486
21436
|
const organizationId = organization?.id || "";
|
|
21487
21437
|
const {
|
|
21488
21438
|
onChange: onSearchChange,
|
|
21489
21439
|
setVisibility: setSearchVisibility,
|
|
21490
21440
|
query: searchQuery
|
|
21491
21441
|
} = search;
|
|
21492
|
-
const [tableQuery, setTableQuery] = (0,
|
|
21493
|
-
const computedQuery = (0,
|
|
21442
|
+
const [tableQuery, setTableQuery] = (0, import_react61.useState)(INITIAL_QUERY10);
|
|
21443
|
+
const computedQuery = (0, import_react61.useMemo)(() => {
|
|
21494
21444
|
const tempQuery = transformDataTableQueryToRQLRequest(tableQuery, TRANSFORM_OPTIONS6);
|
|
21495
21445
|
return {
|
|
21496
21446
|
...tempQuery,
|
|
@@ -21498,11 +21448,11 @@ function OrganizationApisView() {
|
|
|
21498
21448
|
};
|
|
21499
21449
|
}, [tableQuery, searchQuery]);
|
|
21500
21450
|
const [query] = useDebounceValue(computedQuery, 200);
|
|
21501
|
-
const [selectedServiceUser, setSelectedServiceUser] = (0,
|
|
21451
|
+
const [selectedServiceUser, setSelectedServiceUser] = (0, import_react61.useState)(
|
|
21502
21452
|
null
|
|
21503
21453
|
);
|
|
21504
21454
|
const title = `API | ${organization?.title} | ${t.organization({ plural: true, case: "capital" })}`;
|
|
21505
|
-
(0,
|
|
21455
|
+
(0, import_react61.useEffect)(() => {
|
|
21506
21456
|
setSearchVisibility(true);
|
|
21507
21457
|
return () => {
|
|
21508
21458
|
onSearchChange("");
|
|
@@ -21548,10 +21498,10 @@ function OrganizationApisView() {
|
|
|
21548
21498
|
}
|
|
21549
21499
|
};
|
|
21550
21500
|
const loading = isLoading || isFetchingNextPage;
|
|
21551
|
-
const onDialogClose = (0,
|
|
21501
|
+
const onDialogClose = (0, import_react61.useCallback)(() => {
|
|
21552
21502
|
setSelectedServiceUser(null);
|
|
21553
21503
|
}, []);
|
|
21554
|
-
const onRowClick = (0,
|
|
21504
|
+
const onRowClick = (0, import_react61.useCallback)(
|
|
21555
21505
|
(row) => {
|
|
21556
21506
|
setSelectedServiceUser(row);
|
|
21557
21507
|
},
|
|
@@ -21560,7 +21510,7 @@ function OrganizationApisView() {
|
|
|
21560
21510
|
if (isError) {
|
|
21561
21511
|
console.error("ConnectRPC Error:", error);
|
|
21562
21512
|
}
|
|
21563
|
-
const columns = (0,
|
|
21513
|
+
const columns = (0, import_react61.useMemo)(
|
|
21564
21514
|
() => getColumns17({
|
|
21565
21515
|
groupCountMap: infiniteData ? getGroupCountMapFromFirstPage(infiniteData) : {},
|
|
21566
21516
|
t
|