@retinalabsllc/zairusjs 21.2.3 → 21.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +88 -82
- package/dist/index.mjs +53 -43
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1359,6 +1359,7 @@ interface UniversalSettings2Props {
|
|
|
1359
1359
|
declare const UniversalSettings2: React.FC<UniversalSettings2Props>;
|
|
1360
1360
|
|
|
1361
1361
|
interface UniversalDeveloperSettingsProps {
|
|
1362
|
+
onBackHref?: string;
|
|
1362
1363
|
initialPublicKey: string;
|
|
1363
1364
|
initialWebhookUrl: string;
|
|
1364
1365
|
isReadOnly?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1359,6 +1359,7 @@ interface UniversalSettings2Props {
|
|
|
1359
1359
|
declare const UniversalSettings2: React.FC<UniversalSettings2Props>;
|
|
1360
1360
|
|
|
1361
1361
|
interface UniversalDeveloperSettingsProps {
|
|
1362
|
+
onBackHref?: string;
|
|
1362
1363
|
initialPublicKey: string;
|
|
1363
1364
|
initialWebhookUrl: string;
|
|
1364
1365
|
isReadOnly?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -6678,8 +6678,9 @@ function RootSidebar({
|
|
|
6678
6678
|
"button",
|
|
6679
6679
|
{
|
|
6680
6680
|
onClick: () => setIsSheetOpen(true),
|
|
6681
|
-
className: "md:hidden fixed bottom-6 left-1/2 -translate-x-1/2 z-40 bg-black text-white px-8 py-
|
|
6681
|
+
className: "md:hidden fixed bottom-6 left-1/2 -translate-x-1/2 z-40 bg-black text-white px-8 py-2 rounded-full shadow-xl flex items-center justify-center gap-2 text-xs tracking-wide outline-none active:scale-95 transition-transform"
|
|
6682
6682
|
},
|
|
6683
|
+
/* @__PURE__ */ import_react99.default.createElement(import_react100.HugeiconsIcon, { icon: import_core_free_icons39.MenuCircleIcon, size: 14 }),
|
|
6683
6684
|
"Open Menu"
|
|
6684
6685
|
), /* @__PURE__ */ import_react99.default.createElement(
|
|
6685
6686
|
"div",
|
|
@@ -6705,29 +6706,29 @@ function RootSidebar({
|
|
|
6705
6706
|
if (onNavClick) onNavClick(e, item.path);
|
|
6706
6707
|
setIsSheetOpen(false);
|
|
6707
6708
|
},
|
|
6708
|
-
className: `flex items-center gap-4 px-5 py-
|
|
6709
|
+
className: `flex items-center gap-4 px-5 py-3 rounded-full transition-colors outline-none ${isCurrentRoute ? "bg-[#fff5f2] text-[#d97757]" : "text-stone-600 hover:bg-stone-50"}`
|
|
6709
6710
|
},
|
|
6710
6711
|
/* @__PURE__ */ import_react99.default.createElement(
|
|
6711
6712
|
import_react100.HugeiconsIcon,
|
|
6712
6713
|
{
|
|
6713
6714
|
icon: item.icon,
|
|
6714
|
-
size:
|
|
6715
|
+
size: 18,
|
|
6715
6716
|
className: isCurrentRoute ? "text-[#d97757]" : "text-stone-400"
|
|
6716
6717
|
}
|
|
6717
6718
|
),
|
|
6718
|
-
/* @__PURE__ */ import_react99.default.createElement("span", { className: "text-
|
|
6719
|
+
/* @__PURE__ */ import_react99.default.createElement("span", { className: "text-xs tracking-wide" }, item.name)
|
|
6719
6720
|
);
|
|
6720
|
-
}), showLogoutAction && /* @__PURE__ */ import_react99.default.createElement("div", { className: "mt-2
|
|
6721
|
+
}), showLogoutAction && /* @__PURE__ */ import_react99.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react99.default.createElement(
|
|
6721
6722
|
"button",
|
|
6722
6723
|
{
|
|
6723
6724
|
onClick: () => {
|
|
6724
6725
|
setIsSheetOpen(false);
|
|
6725
6726
|
setShowLogoutDialog(true);
|
|
6726
6727
|
},
|
|
6727
|
-
className: "w-full flex items-center gap-4 px-5 py-
|
|
6728
|
+
className: "w-full flex items-center gap-4 px-5 py-3 rounded-full transition-colors outline-none text-red-600 hover:bg-red-50"
|
|
6728
6729
|
},
|
|
6729
|
-
/* @__PURE__ */ import_react99.default.createElement(import_react100.HugeiconsIcon, { icon: import_core_free_icons39.LogoutCircle02Icon, size:
|
|
6730
|
-
/* @__PURE__ */ import_react99.default.createElement("span", { className: "text-
|
|
6730
|
+
/* @__PURE__ */ import_react99.default.createElement(import_react100.HugeiconsIcon, { icon: import_core_free_icons39.LogoutCircle02Icon, size: 18, className: "text-red-500" }),
|
|
6731
|
+
/* @__PURE__ */ import_react99.default.createElement("span", { className: "text-xs tracking-wide" }, "Log Out")
|
|
6731
6732
|
)))
|
|
6732
6733
|
), showLogoutAction && /* @__PURE__ */ import_react99.default.createElement(
|
|
6733
6734
|
ConfirmationDialog,
|
|
@@ -7123,8 +7124,11 @@ var UniversalSettings2 = ({
|
|
|
7123
7124
|
|
|
7124
7125
|
// src/components/UniversalDeveloperSettings.tsx
|
|
7125
7126
|
var import_react103 = __toESM(require("react"));
|
|
7126
|
-
var import_react_hot_toast20 = require("react-hot-toast");
|
|
7127
|
+
var import_react_hot_toast20 = __toESM(require("react-hot-toast"));
|
|
7128
|
+
var import_react104 = require("@hugeicons/react");
|
|
7129
|
+
var import_core_free_icons41 = require("@hugeicons/core-free-icons");
|
|
7127
7130
|
var UniversalDeveloperSettings = ({
|
|
7131
|
+
onBackHref = "/app",
|
|
7128
7132
|
initialPublicKey,
|
|
7129
7133
|
initialWebhookUrl,
|
|
7130
7134
|
isReadOnly = false,
|
|
@@ -7165,13 +7169,13 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7165
7169
|
if (res.success && res.data) {
|
|
7166
7170
|
setPublicKey(res.data.publicKey);
|
|
7167
7171
|
downloadEnvironmentFile(res.data.publicKey, res.data.secretKey);
|
|
7168
|
-
import_react_hot_toast20.
|
|
7172
|
+
import_react_hot_toast20.default.success("Keys generated. Check your downloads folder.");
|
|
7169
7173
|
setIsRollModalOpen(false);
|
|
7170
7174
|
} else {
|
|
7171
|
-
import_react_hot_toast20.
|
|
7175
|
+
import_react_hot_toast20.default.error(res.error || "Uh oh! Something went wrong.");
|
|
7172
7176
|
}
|
|
7173
7177
|
} catch (error) {
|
|
7174
|
-
import_react_hot_toast20.
|
|
7178
|
+
import_react_hot_toast20.default.error("Uh oh! Something went wrong.");
|
|
7175
7179
|
} finally {
|
|
7176
7180
|
setIsGenerating(false);
|
|
7177
7181
|
}
|
|
@@ -7184,40 +7188,42 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7184
7188
|
const res = await onSaveWebhook(webhookUrl);
|
|
7185
7189
|
if (res.success && res.data) {
|
|
7186
7190
|
setWebhookUrl(res.data.webhookUrl || "");
|
|
7187
|
-
import_react_hot_toast20.
|
|
7191
|
+
import_react_hot_toast20.default.success("Webhook URL updated.");
|
|
7188
7192
|
} else {
|
|
7189
|
-
import_react_hot_toast20.
|
|
7193
|
+
import_react_hot_toast20.default.error(res.error || "Uh oh! Something went wrong.");
|
|
7190
7194
|
}
|
|
7191
7195
|
} catch (error) {
|
|
7192
|
-
import_react_hot_toast20.
|
|
7196
|
+
import_react_hot_toast20.default.error("Uh oh! Something went wrong.");
|
|
7193
7197
|
} finally {
|
|
7194
7198
|
setIsSavingWebhook(false);
|
|
7195
7199
|
}
|
|
7196
7200
|
};
|
|
7197
7201
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
7198
7202
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
7199
|
-
return /* @__PURE__ */ import_react103.default.createElement("div", { className: "
|
|
7203
|
+
return /* @__PURE__ */ import_react103.default.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react103.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react103.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react103.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react103.default.createElement(import_react104.HugeiconsIcon, { icon: import_core_free_icons41.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ import_react103.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Developer Settings"), /* @__PURE__ */ import_react103.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage your API credentials and webhook integrations.")), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, isReadOnly && /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ import_react103.default.createElement(import_react104.HugeiconsIcon, { icon: import_core_free_icons41.CircleLock02Icon, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react103.default.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ import_react103.default.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to modify developer settings. Only Owners, Admins, or Managers can roll keys or update webhooks."))), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7200
7204
|
TextInput,
|
|
7201
7205
|
{
|
|
7202
7206
|
label: "Public Key",
|
|
7203
7207
|
value: publicKey || "No key generated yet",
|
|
7204
7208
|
onChange: () => {
|
|
7205
7209
|
},
|
|
7206
|
-
disabled: true
|
|
7210
|
+
disabled: true,
|
|
7211
|
+
placeholder: "pk_live_..."
|
|
7207
7212
|
}
|
|
7208
|
-
), /* @__PURE__ */ import_react103.default.createElement("p", { className: "text-
|
|
7213
|
+
), /* @__PURE__ */ import_react103.default.createElement("p", { className: "text-xs text-stone-500 mt-2 leading-relaxed" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7209
7214
|
ThreeDActionButton,
|
|
7210
7215
|
{
|
|
7216
|
+
type: "button",
|
|
7211
7217
|
onClick: () => {
|
|
7212
7218
|
if (publicKey) setIsRollModalOpen(true);
|
|
7213
7219
|
else handleGenerateKeys();
|
|
7214
7220
|
},
|
|
7215
7221
|
disabled: isGenerating || isReadOnly,
|
|
7216
7222
|
isLoading: isGenerating,
|
|
7217
|
-
className: "w-
|
|
7223
|
+
className: "w-full sm:w-auto min-w-40"
|
|
7218
7224
|
},
|
|
7219
7225
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
7220
|
-
))), /* @__PURE__ */ import_react103.default.createElement("form", { className: "flex flex-col gap-6 border-t border-
|
|
7226
|
+
))), /* @__PURE__ */ import_react103.default.createElement("form", { className: "flex flex-col gap-6 border-t border-stone-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ import_react103.default.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7221
7227
|
TextInput,
|
|
7222
7228
|
{
|
|
7223
7229
|
label: "Webhook URL",
|
|
@@ -7227,29 +7233,29 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7227
7233
|
placeholder: "https://your-domain.com/webhook",
|
|
7228
7234
|
type: "url"
|
|
7229
7235
|
}
|
|
7230
|
-
), /* @__PURE__ */ import_react103.default.createElement("
|
|
7231
|
-
"button",
|
|
7232
|
-
{
|
|
7233
|
-
type: "button",
|
|
7234
|
-
onClick: () => setWebhookUrl(initialWebhookUrl),
|
|
7235
|
-
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors w-full sm:w-auto py-2 sm:py-0 outline-none"
|
|
7236
|
-
},
|
|
7237
|
-
"Cancel"
|
|
7238
|
-
), /* @__PURE__ */ import_react103.default.createElement(
|
|
7236
|
+
), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-2" }, /* @__PURE__ */ import_react103.default.createElement("p", { className: "text-xs text-stone-500 leading-relaxed" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS."), /* @__PURE__ */ import_react103.default.createElement("span", { className: `text-[10px] tracking-widest uppercase font-medium ${webhookUrl ? "text-emerald-600" : "text-stone-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ import_react103.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react103.default.createElement(
|
|
7239
7237
|
ThreeDActionButton,
|
|
7240
7238
|
{
|
|
7241
7239
|
type: "submit",
|
|
7242
7240
|
disabled: isWebhookSaveDisabled,
|
|
7243
7241
|
isLoading: isSavingWebhook,
|
|
7244
|
-
className: "
|
|
7242
|
+
className: "w-full sm:w-auto min-w-40"
|
|
7245
7243
|
},
|
|
7246
7244
|
"Save Webhook"
|
|
7245
|
+
), hasWebhookChanges && !isSavingWebhook && !isReadOnly && /* @__PURE__ */ import_react103.default.createElement(
|
|
7246
|
+
"button",
|
|
7247
|
+
{
|
|
7248
|
+
type: "button",
|
|
7249
|
+
onClick: () => setWebhookUrl(initialWebhookUrl),
|
|
7250
|
+
className: "px-4 py-2 text-stone-500 hover:text-black transition-colors outline-none text-xs font-medium"
|
|
7251
|
+
},
|
|
7252
|
+
"Cancel"
|
|
7247
7253
|
))))), /* @__PURE__ */ import_react103.default.createElement(
|
|
7248
7254
|
ConfirmationDialog,
|
|
7249
7255
|
{
|
|
7250
7256
|
isOpen: isRollModalOpen && !isReadOnly,
|
|
7251
7257
|
title: "Roll API Keys",
|
|
7252
|
-
message: "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active
|
|
7258
|
+
message: "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active integrations.",
|
|
7253
7259
|
confirmText: "Roll Keys",
|
|
7254
7260
|
cancelText: "Cancel",
|
|
7255
7261
|
isProcessing: isGenerating,
|
|
@@ -7261,9 +7267,9 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7261
7267
|
};
|
|
7262
7268
|
|
|
7263
7269
|
// src/components/UniversalApplicationPage2.tsx
|
|
7264
|
-
var
|
|
7265
|
-
var
|
|
7266
|
-
var
|
|
7270
|
+
var import_react105 = __toESM(require("react"));
|
|
7271
|
+
var import_react106 = require("@hugeicons/react");
|
|
7272
|
+
var import_core_free_icons42 = require("@hugeicons/core-free-icons");
|
|
7267
7273
|
var UniversalApplicationPage2 = ({
|
|
7268
7274
|
userRole = "MEMBER",
|
|
7269
7275
|
applications,
|
|
@@ -7279,9 +7285,9 @@ var UniversalApplicationPage2 = ({
|
|
|
7279
7285
|
onCreateApplication
|
|
7280
7286
|
}) => {
|
|
7281
7287
|
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
7282
|
-
const [showStatusModal, setShowStatusModal] = (0,
|
|
7283
|
-
const [localSearchQuery, setLocalSearchQuery] = (0,
|
|
7284
|
-
const typingTimer = (0,
|
|
7288
|
+
const [showStatusModal, setShowStatusModal] = (0, import_react105.useState)(false);
|
|
7289
|
+
const [localSearchQuery, setLocalSearchQuery] = (0, import_react105.useState)(searchQuery);
|
|
7290
|
+
const typingTimer = (0, import_react105.useRef)(null);
|
|
7285
7291
|
const handleSearchInput = (e) => {
|
|
7286
7292
|
const val = e.target.value;
|
|
7287
7293
|
setLocalSearchQuery(val);
|
|
@@ -7298,7 +7304,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7298
7304
|
"REJECTED",
|
|
7299
7305
|
"QUERIED"
|
|
7300
7306
|
];
|
|
7301
|
-
return /* @__PURE__ */
|
|
7307
|
+
return /* @__PURE__ */ import_react105.default.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react105.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ import_react105.default.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ import_react105.default.createElement(import_react106.HugeiconsIcon, { icon: import_core_free_icons42.Search01Icon, size: 16, className: "text-stone-400" })), /* @__PURE__ */ import_react105.default.createElement(
|
|
7302
7308
|
"input",
|
|
7303
7309
|
{
|
|
7304
7310
|
type: "text",
|
|
@@ -7307,15 +7313,15 @@ var UniversalApplicationPage2 = ({
|
|
|
7307
7313
|
onChange: handleSearchInput,
|
|
7308
7314
|
className: "w-full pl-10 pr-4 py-2.5 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-[#d97757] border border-transparent shadow-[0_2px_10px_rgba(0,0,0,0.02)]"
|
|
7309
7315
|
}
|
|
7310
|
-
)), /* @__PURE__ */
|
|
7316
|
+
)), /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ import_react105.default.createElement(
|
|
7311
7317
|
"button",
|
|
7312
7318
|
{
|
|
7313
7319
|
onClick: () => setShowStatusModal(true),
|
|
7314
7320
|
className: "flex items-center justify-center bg-white shadow-[0_2px_10px_rgba(0,0,0,0.02)] w-10 h-10 rounded-full text-stone-500 hover:text-black transition-colors outline-none relative"
|
|
7315
7321
|
},
|
|
7316
|
-
/* @__PURE__ */
|
|
7317
|
-
activeStatusFilter !== "ALL" && /* @__PURE__ */
|
|
7318
|
-
))), /* @__PURE__ */
|
|
7322
|
+
/* @__PURE__ */ import_react105.default.createElement(import_react106.HugeiconsIcon, { icon: import_core_free_icons42.SearchList02Icon, size: 18 }),
|
|
7323
|
+
activeStatusFilter !== "ALL" && /* @__PURE__ */ import_react105.default.createElement("span", { className: "absolute top-2 right-2 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
7324
|
+
))), /* @__PURE__ */ import_react105.default.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ import_react105.default.createElement(
|
|
7319
7325
|
UniversalApplicationsPage,
|
|
7320
7326
|
{
|
|
7321
7327
|
headerTitle: "Recent Filings",
|
|
@@ -7328,7 +7334,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7328
7334
|
onApplicationClick,
|
|
7329
7335
|
onCreateApplication: canManage ? onCreateApplication : void 0
|
|
7330
7336
|
}
|
|
7331
|
-
)), /* @__PURE__ */
|
|
7337
|
+
)), /* @__PURE__ */ import_react105.default.createElement(
|
|
7332
7338
|
ReusableOptions,
|
|
7333
7339
|
{
|
|
7334
7340
|
isOpen: showStatusModal,
|
|
@@ -7345,9 +7351,9 @@ var UniversalApplicationPage2 = ({
|
|
|
7345
7351
|
};
|
|
7346
7352
|
|
|
7347
7353
|
// src/components/UniversalApplicationDetails.tsx
|
|
7348
|
-
var
|
|
7349
|
-
var
|
|
7350
|
-
var
|
|
7354
|
+
var import_react107 = __toESM(require("react"));
|
|
7355
|
+
var import_react108 = require("@hugeicons/react");
|
|
7356
|
+
var import_core_free_icons43 = require("@hugeicons/core-free-icons");
|
|
7351
7357
|
var formatType2 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7352
7358
|
var UniversalApplicationDetails = ({
|
|
7353
7359
|
onBackHref,
|
|
@@ -7355,8 +7361,8 @@ var UniversalApplicationDetails = ({
|
|
|
7355
7361
|
canDelete,
|
|
7356
7362
|
onDeleteSubmit
|
|
7357
7363
|
}) => {
|
|
7358
|
-
const [isDeleting, setIsDeleting] = (0,
|
|
7359
|
-
const [confirmDialog, setConfirmDialog] = (0,
|
|
7364
|
+
const [isDeleting, setIsDeleting] = (0, import_react107.useState)(false);
|
|
7365
|
+
const [confirmDialog, setConfirmDialog] = (0, import_react107.useState)(false);
|
|
7360
7366
|
const isLockedStatus = ["COMPLETED", "PENDING", "REJECTED", "QUERIED"].includes(application.status);
|
|
7361
7367
|
const deletePermitted = canDelete && !isLockedStatus;
|
|
7362
7368
|
const handleDelete = async () => {
|
|
@@ -7368,32 +7374,32 @@ var UniversalApplicationDetails = ({
|
|
|
7368
7374
|
}
|
|
7369
7375
|
setIsDeleting(false);
|
|
7370
7376
|
};
|
|
7371
|
-
return /* @__PURE__ */
|
|
7377
|
+
return /* @__PURE__ */ import_react107.default.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react107.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react107.default.createElement(
|
|
7372
7378
|
ConfirmationDialog,
|
|
7373
7379
|
{
|
|
7374
7380
|
isOpen: confirmDialog,
|
|
7375
7381
|
title: "Delete Application",
|
|
7376
7382
|
message: "Are you sure you want to permanently delete this application and its assets? This action cannot be undone.",
|
|
7377
|
-
confirmText: "Delete
|
|
7383
|
+
confirmText: "Delete",
|
|
7378
7384
|
cancelText: "Cancel",
|
|
7379
7385
|
isProcessing: isDeleting,
|
|
7380
7386
|
isDestructive: true,
|
|
7381
7387
|
onClose: () => setConfirmDialog(false),
|
|
7382
7388
|
onConfirm: handleDelete
|
|
7383
7389
|
}
|
|
7384
|
-
), /* @__PURE__ */
|
|
7390
|
+
), /* @__PURE__ */ import_react107.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react107.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react107.default.createElement(import_react108.HugeiconsIcon, { icon: import_core_free_icons43.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react107.default.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ import_react107.default.createElement("div", null, /* @__PURE__ */ import_react107.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ import_react107.default.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ import_react107.default.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto uppercase tracking-widest " }, application.status)), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ import_react107.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ import_react107.default.createElement("span", { className: "text-sm text-black py-2 " }, application.name)), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ import_react107.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Filing Type"), /* @__PURE__ */ import_react107.default.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ import_react107.default.createElement("a", { href: `/app/applications/app/${application.id}`, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90" }, "Open Application"), /* @__PURE__ */ import_react107.default.createElement("a", { href: `/app/applications/assets/${application.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Application Assets"), deletePermitted && /* @__PURE__ */ import_react107.default.createElement("button", { onClick: () => setConfirmDialog(true), className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Delete Application"))));
|
|
7385
7391
|
};
|
|
7386
7392
|
|
|
7387
7393
|
// src/components/UniversalCreateApplication.tsx
|
|
7388
|
-
var
|
|
7394
|
+
var import_react109 = __toESM(require("react"));
|
|
7389
7395
|
var import_react_hot_toast21 = __toESM(require("react-hot-toast"));
|
|
7390
|
-
var
|
|
7391
|
-
var
|
|
7396
|
+
var import_react110 = require("@hugeicons/react");
|
|
7397
|
+
var import_core_free_icons44 = require("@hugeicons/core-free-icons");
|
|
7392
7398
|
var MemberAvatar6 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
7393
|
-
const [loaded, setLoaded] = (0,
|
|
7394
|
-
const [error, setError] = (0,
|
|
7399
|
+
const [loaded, setLoaded] = (0, import_react109.useState)(false);
|
|
7400
|
+
const [error, setError] = (0, import_react109.useState)(false);
|
|
7395
7401
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
7396
|
-
return /* @__PURE__ */
|
|
7402
|
+
return /* @__PURE__ */ import_react109.default.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Loading03Icon, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ import_react109.default.createElement("img", { src: error || !src ? defaultAvatar : src, alt: "Avatar", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })));
|
|
7397
7403
|
};
|
|
7398
7404
|
var UniversalCreateApplication = ({
|
|
7399
7405
|
onBackHref,
|
|
@@ -7416,32 +7422,32 @@ var UniversalCreateApplication = ({
|
|
|
7416
7422
|
onCreateSubmit
|
|
7417
7423
|
}) => {
|
|
7418
7424
|
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
7419
|
-
const [creationMode, setCreationMode] = (0,
|
|
7425
|
+
const [creationMode, setCreationMode] = (0, import_react109.useState)("EXISTING");
|
|
7420
7426
|
const defaultTypeKey = applicationTypesMeta.length > 0 ? applicationTypesMeta[0].key : "";
|
|
7421
|
-
const [selectedTypeKey, setSelectedTypeKey] = (0,
|
|
7422
|
-
(0,
|
|
7427
|
+
const [selectedTypeKey, setSelectedTypeKey] = (0, import_react109.useState)(defaultTypeKey);
|
|
7428
|
+
(0, import_react109.useEffect)(() => {
|
|
7423
7429
|
if (!selectedTypeKey && applicationTypesMeta.length > 0) {
|
|
7424
7430
|
setSelectedTypeKey(applicationTypesMeta[0].key);
|
|
7425
7431
|
}
|
|
7426
7432
|
}, [applicationTypesMeta, selectedTypeKey]);
|
|
7427
|
-
const [selectedCompanyId, setSelectedCompanyId] = (0,
|
|
7428
|
-
const [newCompanyName, setNewCompanyName] = (0,
|
|
7429
|
-
const [isPrivate, setIsPrivate] = (0,
|
|
7430
|
-
const [selectedParticipants, setSelectedParticipants] = (0,
|
|
7431
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
7432
|
-
const [showTypeModal, setShowTypeModal] = (0,
|
|
7433
|
-
const [showMembersModal, setShowMembersModal] = (0,
|
|
7434
|
-
const [showCompaniesModal, setShowCompaniesModal] = (0,
|
|
7435
|
-
const [localMemSearch, setLocalMemSearch] = (0,
|
|
7436
|
-
const memTimer = (0,
|
|
7433
|
+
const [selectedCompanyId, setSelectedCompanyId] = (0, import_react109.useState)(null);
|
|
7434
|
+
const [newCompanyName, setNewCompanyName] = (0, import_react109.useState)("");
|
|
7435
|
+
const [isPrivate, setIsPrivate] = (0, import_react109.useState)(false);
|
|
7436
|
+
const [selectedParticipants, setSelectedParticipants] = (0, import_react109.useState)(/* @__PURE__ */ new Set());
|
|
7437
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react109.useState)(false);
|
|
7438
|
+
const [showTypeModal, setShowTypeModal] = (0, import_react109.useState)(false);
|
|
7439
|
+
const [showMembersModal, setShowMembersModal] = (0, import_react109.useState)(false);
|
|
7440
|
+
const [showCompaniesModal, setShowCompaniesModal] = (0, import_react109.useState)(false);
|
|
7441
|
+
const [localMemSearch, setLocalMemSearch] = (0, import_react109.useState)(membersSearchQuery);
|
|
7442
|
+
const memTimer = (0, import_react109.useRef)(null);
|
|
7437
7443
|
const handleMemSearch = (e) => {
|
|
7438
7444
|
const val = e.target.value;
|
|
7439
7445
|
setLocalMemSearch(val);
|
|
7440
7446
|
if (memTimer.current) clearTimeout(memTimer.current);
|
|
7441
7447
|
memTimer.current = setTimeout(() => onMembersSearchChange(val), 500);
|
|
7442
7448
|
};
|
|
7443
|
-
const [localCompSearch, setLocalCompSearch] = (0,
|
|
7444
|
-
const compTimer = (0,
|
|
7449
|
+
const [localCompSearch, setLocalCompSearch] = (0, import_react109.useState)(companiesSearchQuery);
|
|
7450
|
+
const compTimer = (0, import_react109.useRef)(null);
|
|
7445
7451
|
const handleCompSearch = (e) => {
|
|
7446
7452
|
const val = e.target.value;
|
|
7447
7453
|
setLocalCompSearch(val);
|
|
@@ -7484,9 +7490,9 @@ var UniversalCreateApplication = ({
|
|
|
7484
7490
|
{ id: "EXISTING", label: "Select Company" },
|
|
7485
7491
|
{ id: "NEW", label: "New Company" }
|
|
7486
7492
|
];
|
|
7487
|
-
return /* @__PURE__ */
|
|
7493
|
+
return /* @__PURE__ */ import_react109.default.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react109.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react109.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react109.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ import_react109.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Application"), /* @__PURE__ */ import_react109.default.createElement("p", { className: "text-xs text-stone-500" }, "Initiate a new registration or filing for a company.")), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, modeTabs.map((tab) => {
|
|
7488
7494
|
const isActive = creationMode === tab.id;
|
|
7489
|
-
return /* @__PURE__ */
|
|
7495
|
+
return /* @__PURE__ */ import_react109.default.createElement(
|
|
7490
7496
|
"button",
|
|
7491
7497
|
{
|
|
7492
7498
|
key: tab.id,
|
|
@@ -7497,9 +7503,9 @@ var UniversalCreateApplication = ({
|
|
|
7497
7503
|
},
|
|
7498
7504
|
tab.label
|
|
7499
7505
|
);
|
|
7500
|
-
}))), /* @__PURE__ */
|
|
7506
|
+
}))), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react109.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.CircleLock02Icon, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to create applications."))), creationMode === "EXISTING" ? /* @__PURE__ */ import_react109.default.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ import_react109.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ import_react109.default.createElement("div", { onClick: () => canManage && !isSubmitting && setShowCompaniesModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Building03Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ import_react109.default.createElement("span", { className: `w-full pl-8 text-sm truncate block ${activeCompany ? "text-black" : "text-stone-400"}` }, activeCompany ? activeCompany.name : "Select an existing company..."))) : /* @__PURE__ */ import_react109.default.createElement(import_react109.default.Fragment, null, /* @__PURE__ */ import_react109.default.createElement(TextInput, { label: "Company Name", value: newCompanyName, onChange: (val) => setNewCompanyName(val), disabled: isSubmitting || !canManage, placeholder: "e.g. Acme Innovations Ltd.", maxLength: 80 }), /* @__PURE__ */ import_react109.default.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Company"), /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-stone-500" }, "Only assigned members can view and access its applications.")), /* @__PURE__ */ import_react109.default.createElement("button", { type: "button", onClick: () => setIsPrivate(!isPrivate), disabled: !canManage || isSubmitting, className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"}` }, /* @__PURE__ */ import_react109.default.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` }))), isPrivate && /* @__PURE__ */ import_react109.default.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-black tracking-tight" }, "Members"), /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-[#d97757]" }, selectedParticipants.size, " added")), /* @__PURE__ */ import_react109.default.createElement("button", { type: "button", onClick: () => setShowMembersModal(true), disabled: !canManage || isSubmitting, className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access"))), /* @__PURE__ */ import_react109.default.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ import_react109.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Application Type"), /* @__PURE__ */ import_react109.default.createElement("div", { onClick: () => canManage && !isSubmitting && setShowTypeModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.File02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ import_react109.default.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, activeTypeObj?.label || "Select Type..."))), canManage && /* @__PURE__ */ import_react109.default.createElement("div", { className: "pt-6" }, /* @__PURE__ */ import_react109.default.createElement(ThreeDActionButton, { type: "submit", disabled: isSubmitting || !selectedTypeKey || creationMode === "EXISTING" && !selectedCompanyId || creationMode === "NEW" && newCompanyName.length < 2, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Create Application")))), showTypeModal && canManage && /* @__PURE__ */ import_react109.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowTypeModal(false) }), /* @__PURE__ */ import_react109.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react109.default.createElement("h3", { className: "text-sm text-black tracking-tight " }, "Application Type"), /* @__PURE__ */ import_react109.default.createElement("button", { onClick: () => setShowTypeModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, applicationTypesMeta.map((item) => {
|
|
7501
7507
|
const isSelected = selectedTypeKey === item.key;
|
|
7502
|
-
return /* @__PURE__ */
|
|
7508
|
+
return /* @__PURE__ */ import_react109.default.createElement(
|
|
7503
7509
|
"div",
|
|
7504
7510
|
{
|
|
7505
7511
|
key: item.key,
|
|
@@ -7508,15 +7514,15 @@ var UniversalCreateApplication = ({
|
|
|
7508
7514
|
},
|
|
7509
7515
|
className: `p-4 rounded-xl cursor-pointer transition-all border ${isSelected ? "bg-white border-[#d97757]" : "bg-stone-50 border-transparent hover:bg-stone-100/60"}`
|
|
7510
7516
|
},
|
|
7511
|
-
/* @__PURE__ */
|
|
7512
|
-
/* @__PURE__ */
|
|
7517
|
+
/* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ import_react109.default.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.CheckmarkCircle02Icon, size: 16, className: "text-[#d97757] shrink-0" })),
|
|
7518
|
+
/* @__PURE__ */ import_react109.default.createElement("p", { className: "text-[11px] text-stone-500 mt-1 leading-relaxed whitespace-normal wrap-break-word" }, item.desc)
|
|
7513
7519
|
);
|
|
7514
|
-
})))), showCompaniesModal && canManage && /* @__PURE__ */
|
|
7520
|
+
})))), showCompaniesModal && canManage && /* @__PURE__ */ import_react109.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ import_react109.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react109.default.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ import_react109.default.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ import_react109.default.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Search01Icon, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ import_react109.default.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ import_react109.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Loading03Icon, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ import_react109.default.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ import_react109.default.createElement("div", { key: comp.id, onClick: () => {
|
|
7515
7521
|
setSelectedCompanyId(comp.id);
|
|
7516
|
-
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */
|
|
7522
|
+
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest uppercase" }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest uppercase" }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.CheckmarkCircle02Icon, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ import_react109.default.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ import_react109.default.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.ArrowLeft01Icon, size: 12 })), /* @__PURE__ */ import_react109.default.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.ArrowRight01Icon, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ import_react109.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ import_react109.default.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react109.default.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ import_react109.default.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ import_react109.default.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Search01Icon, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ import_react109.default.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ import_react109.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Loading03Icon, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ import_react109.default.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
7517
7523
|
const isChecked = selectedParticipants.has(member.userId);
|
|
7518
|
-
return /* @__PURE__ */
|
|
7519
|
-
})), /* @__PURE__ */
|
|
7524
|
+
return /* @__PURE__ */ import_react109.default.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ import_react109.default.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ import_react109.default.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ import_react109.default.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.Tick02Icon, size: 14, className: "text-white" }))));
|
|
7525
|
+
})), /* @__PURE__ */ import_react109.default.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ import_react109.default.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ import_react109.default.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ import_react109.default.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.ArrowLeft01Icon, size: 12 })), /* @__PURE__ */ import_react109.default.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ import_react109.default.createElement(import_react110.HugeiconsIcon, { icon: import_core_free_icons44.ArrowRight01Icon, size: 12 })))))));
|
|
7520
7526
|
};
|
|
7521
7527
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7522
7528
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -6698,6 +6698,7 @@ import React57, { useState as useState41 } from "react";
|
|
|
6698
6698
|
import Link10 from "next/link";
|
|
6699
6699
|
import { HugeiconsIcon as HugeiconsIcon43 } from "@hugeicons/react";
|
|
6700
6700
|
import {
|
|
6701
|
+
MenuCircleIcon,
|
|
6701
6702
|
LogoutCircle02Icon as LogoutCircle02Icon3
|
|
6702
6703
|
} from "@hugeicons/core-free-icons";
|
|
6703
6704
|
function RootSidebar({
|
|
@@ -6756,8 +6757,9 @@ function RootSidebar({
|
|
|
6756
6757
|
"button",
|
|
6757
6758
|
{
|
|
6758
6759
|
onClick: () => setIsSheetOpen(true),
|
|
6759
|
-
className: "md:hidden fixed bottom-6 left-1/2 -translate-x-1/2 z-40 bg-black text-white px-8 py-
|
|
6760
|
+
className: "md:hidden fixed bottom-6 left-1/2 -translate-x-1/2 z-40 bg-black text-white px-8 py-2 rounded-full shadow-xl flex items-center justify-center gap-2 text-xs tracking-wide outline-none active:scale-95 transition-transform"
|
|
6760
6761
|
},
|
|
6762
|
+
/* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: MenuCircleIcon, size: 14 }),
|
|
6761
6763
|
"Open Menu"
|
|
6762
6764
|
), /* @__PURE__ */ React57.createElement(
|
|
6763
6765
|
"div",
|
|
@@ -6783,29 +6785,29 @@ function RootSidebar({
|
|
|
6783
6785
|
if (onNavClick) onNavClick(e, item.path);
|
|
6784
6786
|
setIsSheetOpen(false);
|
|
6785
6787
|
},
|
|
6786
|
-
className: `flex items-center gap-4 px-5 py-
|
|
6788
|
+
className: `flex items-center gap-4 px-5 py-3 rounded-full transition-colors outline-none ${isCurrentRoute ? "bg-[#fff5f2] text-[#d97757]" : "text-stone-600 hover:bg-stone-50"}`
|
|
6787
6789
|
},
|
|
6788
6790
|
/* @__PURE__ */ React57.createElement(
|
|
6789
6791
|
HugeiconsIcon43,
|
|
6790
6792
|
{
|
|
6791
6793
|
icon: item.icon,
|
|
6792
|
-
size:
|
|
6794
|
+
size: 18,
|
|
6793
6795
|
className: isCurrentRoute ? "text-[#d97757]" : "text-stone-400"
|
|
6794
6796
|
}
|
|
6795
6797
|
),
|
|
6796
|
-
/* @__PURE__ */ React57.createElement("span", { className: "text-
|
|
6798
|
+
/* @__PURE__ */ React57.createElement("span", { className: "text-xs tracking-wide" }, item.name)
|
|
6797
6799
|
);
|
|
6798
|
-
}), showLogoutAction && /* @__PURE__ */ React57.createElement("div", { className: "mt-2
|
|
6800
|
+
}), showLogoutAction && /* @__PURE__ */ React57.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React57.createElement(
|
|
6799
6801
|
"button",
|
|
6800
6802
|
{
|
|
6801
6803
|
onClick: () => {
|
|
6802
6804
|
setIsSheetOpen(false);
|
|
6803
6805
|
setShowLogoutDialog(true);
|
|
6804
6806
|
},
|
|
6805
|
-
className: "w-full flex items-center gap-4 px-5 py-
|
|
6807
|
+
className: "w-full flex items-center gap-4 px-5 py-3 rounded-full transition-colors outline-none text-red-600 hover:bg-red-50"
|
|
6806
6808
|
},
|
|
6807
|
-
/* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: LogoutCircle02Icon3, size:
|
|
6808
|
-
/* @__PURE__ */ React57.createElement("span", { className: "text-
|
|
6809
|
+
/* @__PURE__ */ React57.createElement(HugeiconsIcon43, { icon: LogoutCircle02Icon3, size: 18, className: "text-red-500" }),
|
|
6810
|
+
/* @__PURE__ */ React57.createElement("span", { className: "text-xs tracking-wide" }, "Log Out")
|
|
6809
6811
|
)))
|
|
6810
6812
|
), showLogoutAction && /* @__PURE__ */ React57.createElement(
|
|
6811
6813
|
ConfirmationDialog,
|
|
@@ -7207,8 +7209,14 @@ var UniversalSettings2 = ({
|
|
|
7207
7209
|
|
|
7208
7210
|
// src/components/UniversalDeveloperSettings.tsx
|
|
7209
7211
|
import React59, { useState as useState43, useEffect as useEffect24 } from "react";
|
|
7210
|
-
import
|
|
7212
|
+
import toast19 from "react-hot-toast";
|
|
7213
|
+
import { HugeiconsIcon as HugeiconsIcon45 } from "@hugeicons/react";
|
|
7214
|
+
import {
|
|
7215
|
+
ArrowLeft01Icon as ArrowLeft01Icon24,
|
|
7216
|
+
CircleLock02Icon as CircleLock02Icon6
|
|
7217
|
+
} from "@hugeicons/core-free-icons";
|
|
7211
7218
|
var UniversalDeveloperSettings = ({
|
|
7219
|
+
onBackHref = "/app",
|
|
7212
7220
|
initialPublicKey,
|
|
7213
7221
|
initialWebhookUrl,
|
|
7214
7222
|
isReadOnly = false,
|
|
@@ -7280,28 +7288,30 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7280
7288
|
};
|
|
7281
7289
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
7282
7290
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
7283
|
-
return /* @__PURE__ */ React59.createElement("div", { className: "
|
|
7291
|
+
return /* @__PURE__ */ React59.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React59.createElement(ManagedToaster, null), /* @__PURE__ */ React59.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React59.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React59.createElement(HugeiconsIcon45, { icon: ArrowLeft01Icon24, size: 16 }), " Back")), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React59.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Developer Settings"), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-stone-500" }, "Manage your API credentials and webhook integrations.")), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, isReadOnly && /* @__PURE__ */ React59.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React59.createElement(HugeiconsIcon45, { icon: CircleLock02Icon6, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React59.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React59.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to modify developer settings. Only Owners, Admins, or Managers can roll keys or update webhooks."))), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React59.createElement(
|
|
7284
7292
|
TextInput,
|
|
7285
7293
|
{
|
|
7286
7294
|
label: "Public Key",
|
|
7287
7295
|
value: publicKey || "No key generated yet",
|
|
7288
7296
|
onChange: () => {
|
|
7289
7297
|
},
|
|
7290
|
-
disabled: true
|
|
7298
|
+
disabled: true,
|
|
7299
|
+
placeholder: "pk_live_..."
|
|
7291
7300
|
}
|
|
7292
|
-
), /* @__PURE__ */ React59.createElement("p", { className: "text-
|
|
7301
|
+
), /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-stone-500 mt-2 leading-relaxed" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ React59.createElement("div", { className: "flex" }, /* @__PURE__ */ React59.createElement(
|
|
7293
7302
|
ThreeDActionButton,
|
|
7294
7303
|
{
|
|
7304
|
+
type: "button",
|
|
7295
7305
|
onClick: () => {
|
|
7296
7306
|
if (publicKey) setIsRollModalOpen(true);
|
|
7297
7307
|
else handleGenerateKeys();
|
|
7298
7308
|
},
|
|
7299
7309
|
disabled: isGenerating || isReadOnly,
|
|
7300
7310
|
isLoading: isGenerating,
|
|
7301
|
-
className: "w-
|
|
7311
|
+
className: "w-full sm:w-auto min-w-40"
|
|
7302
7312
|
},
|
|
7303
7313
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
7304
|
-
))), /* @__PURE__ */ React59.createElement("form", { className: "flex flex-col gap-6 border-t border-
|
|
7314
|
+
))), /* @__PURE__ */ React59.createElement("form", { className: "flex flex-col gap-6 border-t border-stone-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ React59.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React59.createElement(
|
|
7305
7315
|
TextInput,
|
|
7306
7316
|
{
|
|
7307
7317
|
label: "Webhook URL",
|
|
@@ -7311,29 +7321,29 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7311
7321
|
placeholder: "https://your-domain.com/webhook",
|
|
7312
7322
|
type: "url"
|
|
7313
7323
|
}
|
|
7314
|
-
), /* @__PURE__ */ React59.createElement("
|
|
7315
|
-
"button",
|
|
7316
|
-
{
|
|
7317
|
-
type: "button",
|
|
7318
|
-
onClick: () => setWebhookUrl(initialWebhookUrl),
|
|
7319
|
-
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors w-full sm:w-auto py-2 sm:py-0 outline-none"
|
|
7320
|
-
},
|
|
7321
|
-
"Cancel"
|
|
7322
|
-
), /* @__PURE__ */ React59.createElement(
|
|
7324
|
+
), /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-2" }, /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-stone-500 leading-relaxed" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS."), /* @__PURE__ */ React59.createElement("span", { className: `text-[10px] tracking-widest uppercase font-medium ${webhookUrl ? "text-emerald-600" : "text-stone-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React59.createElement(
|
|
7323
7325
|
ThreeDActionButton,
|
|
7324
7326
|
{
|
|
7325
7327
|
type: "submit",
|
|
7326
7328
|
disabled: isWebhookSaveDisabled,
|
|
7327
7329
|
isLoading: isSavingWebhook,
|
|
7328
|
-
className: "
|
|
7330
|
+
className: "w-full sm:w-auto min-w-40"
|
|
7329
7331
|
},
|
|
7330
7332
|
"Save Webhook"
|
|
7333
|
+
), hasWebhookChanges && !isSavingWebhook && !isReadOnly && /* @__PURE__ */ React59.createElement(
|
|
7334
|
+
"button",
|
|
7335
|
+
{
|
|
7336
|
+
type: "button",
|
|
7337
|
+
onClick: () => setWebhookUrl(initialWebhookUrl),
|
|
7338
|
+
className: "px-4 py-2 text-stone-500 hover:text-black transition-colors outline-none text-xs font-medium"
|
|
7339
|
+
},
|
|
7340
|
+
"Cancel"
|
|
7331
7341
|
))))), /* @__PURE__ */ React59.createElement(
|
|
7332
7342
|
ConfirmationDialog,
|
|
7333
7343
|
{
|
|
7334
7344
|
isOpen: isRollModalOpen && !isReadOnly,
|
|
7335
7345
|
title: "Roll API Keys",
|
|
7336
|
-
message: "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active
|
|
7346
|
+
message: "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active integrations.",
|
|
7337
7347
|
confirmText: "Roll Keys",
|
|
7338
7348
|
cancelText: "Cancel",
|
|
7339
7349
|
isProcessing: isGenerating,
|
|
@@ -7346,7 +7356,7 @@ AUDDITUR_SECRET_KEY="${secKey}"
|
|
|
7346
7356
|
|
|
7347
7357
|
// src/components/UniversalApplicationPage2.tsx
|
|
7348
7358
|
import React60, { useState as useState44, useRef as useRef18 } from "react";
|
|
7349
|
-
import { HugeiconsIcon as
|
|
7359
|
+
import { HugeiconsIcon as HugeiconsIcon46 } from "@hugeicons/react";
|
|
7350
7360
|
import {
|
|
7351
7361
|
Search01Icon as Search01Icon9,
|
|
7352
7362
|
SearchList02Icon as SearchList02Icon4
|
|
@@ -7385,7 +7395,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7385
7395
|
"REJECTED",
|
|
7386
7396
|
"QUERIED"
|
|
7387
7397
|
];
|
|
7388
|
-
return /* @__PURE__ */ React60.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React60.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React60.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ React60.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ React60.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React60.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React60.createElement(
|
|
7398
|
+
return /* @__PURE__ */ React60.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React60.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React60.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Applications Directory")), /* @__PURE__ */ React60.createElement("p", { className: "text-xs text-stone-500" }, "Search, filter, and track all your organizational applications.")), /* @__PURE__ */ React60.createElement("div", { className: "flex flex-row flex-nowrap mb-2 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React60.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React60.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React60.createElement(HugeiconsIcon46, { icon: Search01Icon9, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React60.createElement(
|
|
7389
7399
|
"input",
|
|
7390
7400
|
{
|
|
7391
7401
|
type: "text",
|
|
@@ -7400,7 +7410,7 @@ var UniversalApplicationPage2 = ({
|
|
|
7400
7410
|
onClick: () => setShowStatusModal(true),
|
|
7401
7411
|
className: "flex items-center justify-center bg-white shadow-[0_2px_10px_rgba(0,0,0,0.02)] w-10 h-10 rounded-full text-stone-500 hover:text-black transition-colors outline-none relative"
|
|
7402
7412
|
},
|
|
7403
|
-
/* @__PURE__ */ React60.createElement(
|
|
7413
|
+
/* @__PURE__ */ React60.createElement(HugeiconsIcon46, { icon: SearchList02Icon4, size: 18 }),
|
|
7404
7414
|
activeStatusFilter !== "ALL" && /* @__PURE__ */ React60.createElement("span", { className: "absolute top-2 right-2 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
7405
7415
|
))), /* @__PURE__ */ React60.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ React60.createElement(
|
|
7406
7416
|
UniversalApplicationsPage,
|
|
@@ -7433,8 +7443,8 @@ var UniversalApplicationPage2 = ({
|
|
|
7433
7443
|
|
|
7434
7444
|
// src/components/UniversalApplicationDetails.tsx
|
|
7435
7445
|
import React61, { useState as useState45 } from "react";
|
|
7436
|
-
import { HugeiconsIcon as
|
|
7437
|
-
import { ArrowLeft01Icon as
|
|
7446
|
+
import { HugeiconsIcon as HugeiconsIcon47 } from "@hugeicons/react";
|
|
7447
|
+
import { ArrowLeft01Icon as ArrowLeft01Icon25 } from "@hugeicons/core-free-icons";
|
|
7438
7448
|
var formatType2 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7439
7449
|
var UniversalApplicationDetails = ({
|
|
7440
7450
|
onBackHref,
|
|
@@ -7461,26 +7471,26 @@ var UniversalApplicationDetails = ({
|
|
|
7461
7471
|
isOpen: confirmDialog,
|
|
7462
7472
|
title: "Delete Application",
|
|
7463
7473
|
message: "Are you sure you want to permanently delete this application and its assets? This action cannot be undone.",
|
|
7464
|
-
confirmText: "Delete
|
|
7474
|
+
confirmText: "Delete",
|
|
7465
7475
|
cancelText: "Cancel",
|
|
7466
7476
|
isProcessing: isDeleting,
|
|
7467
7477
|
isDestructive: true,
|
|
7468
7478
|
onClose: () => setConfirmDialog(false),
|
|
7469
7479
|
onConfirm: handleDelete
|
|
7470
7480
|
}
|
|
7471
|
-
), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(
|
|
7481
|
+
), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon25, size: 16 }), " Back")), /* @__PURE__ */ React61.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ React61.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ React61.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto uppercase tracking-widest " }, application.status)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2 " }, application.name)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Filing Type"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/app/${application.id}`, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90" }, "Open Application"), /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/assets/${application.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Application Assets"), deletePermitted && /* @__PURE__ */ React61.createElement("button", { onClick: () => setConfirmDialog(true), className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Delete Application"))));
|
|
7472
7482
|
};
|
|
7473
7483
|
|
|
7474
7484
|
// src/components/UniversalCreateApplication.tsx
|
|
7475
7485
|
import React62, { useState as useState46, useRef as useRef19, useEffect as useEffect25 } from "react";
|
|
7476
7486
|
import toast20 from "react-hot-toast";
|
|
7477
|
-
import { HugeiconsIcon as
|
|
7487
|
+
import { HugeiconsIcon as HugeiconsIcon48 } from "@hugeicons/react";
|
|
7478
7488
|
import {
|
|
7479
|
-
ArrowLeft01Icon as
|
|
7489
|
+
ArrowLeft01Icon as ArrowLeft01Icon26,
|
|
7480
7490
|
ArrowRight01Icon as ArrowRight01Icon19,
|
|
7481
7491
|
Loading03Icon as Loading03Icon32,
|
|
7482
7492
|
Search01Icon as Search01Icon10,
|
|
7483
|
-
CircleLock02Icon as
|
|
7493
|
+
CircleLock02Icon as CircleLock02Icon7,
|
|
7484
7494
|
CheckmarkCircle02Icon as CheckmarkCircle02Icon2,
|
|
7485
7495
|
Building03Icon,
|
|
7486
7496
|
File02Icon,
|
|
@@ -7490,7 +7500,7 @@ var MemberAvatar6 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
|
7490
7500
|
const [loaded, setLoaded] = useState46(false);
|
|
7491
7501
|
const [error, setError] = useState46(false);
|
|
7492
7502
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
7493
|
-
return /* @__PURE__ */ React62.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React62.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React62.createElement(
|
|
7503
|
+
return /* @__PURE__ */ React62.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React62.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon32, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React62.createElement("img", { src: error || !src ? defaultAvatar : src, alt: "Avatar", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })));
|
|
7494
7504
|
};
|
|
7495
7505
|
var UniversalCreateApplication = ({
|
|
7496
7506
|
onBackHref,
|
|
@@ -7581,7 +7591,7 @@ var UniversalCreateApplication = ({
|
|
|
7581
7591
|
{ id: "EXISTING", label: "Select Company" },
|
|
7582
7592
|
{ id: "NEW", label: "New Company" }
|
|
7583
7593
|
];
|
|
7584
|
-
return /* @__PURE__ */ React62.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React62.createElement(ManagedToaster, null), /* @__PURE__ */ React62.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React62.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React62.createElement(
|
|
7594
|
+
return /* @__PURE__ */ React62.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React62.createElement(ManagedToaster, null), /* @__PURE__ */ React62.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React62.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon26, size: 16 }), " Back")), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-1 mb-6 px-1" }, /* @__PURE__ */ React62.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Application"), /* @__PURE__ */ React62.createElement("p", { className: "text-xs text-stone-500" }, "Initiate a new registration or filing for a company.")), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center mb-4 w-full animate-in fade-in duration-300 px-2" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, modeTabs.map((tab) => {
|
|
7585
7595
|
const isActive = creationMode === tab.id;
|
|
7586
7596
|
return /* @__PURE__ */ React62.createElement(
|
|
7587
7597
|
"button",
|
|
@@ -7594,7 +7604,7 @@ var UniversalCreateApplication = ({
|
|
|
7594
7604
|
},
|
|
7595
7605
|
tab.label
|
|
7596
7606
|
);
|
|
7597
|
-
}))), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React62.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ React62.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React62.createElement(
|
|
7607
|
+
}))), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React62.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ React62.createElement("div", { className: "flex items-start gap-3 p-4 bg-stone-50 rounded-xl" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CircleLock02Icon7, size: 20, className: "text-stone-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500 mt-1 leading-relaxed" }, "You lack clearance to create applications."))), creationMode === "EXISTING" ? /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Target Company"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowCompaniesModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Building03Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: `w-full pl-8 text-sm truncate block ${activeCompany ? "text-black" : "text-stone-400"}` }, activeCompany ? activeCompany.name : "Select an existing company..."))) : /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(TextInput, { label: "Company Name", value: newCompanyName, onChange: (val) => setNewCompanyName(val), disabled: isSubmitting || !canManage, placeholder: "e.g. Acme Innovations Ltd.", maxLength: 80 }), /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Company"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-500" }, "Only assigned members can view and access its applications.")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setIsPrivate(!isPrivate), disabled: !canManage || isSubmitting, className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"}` }, /* @__PURE__ */ React62.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` }))), isPrivate && /* @__PURE__ */ React62.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-black tracking-tight" }, "Members"), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-[#d97757]" }, selectedParticipants.size, " added")), /* @__PURE__ */ React62.createElement("button", { type: "button", onClick: () => setShowMembersModal(true), disabled: !canManage || isSubmitting, className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access"))), /* @__PURE__ */ React62.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React62.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Application Type"), /* @__PURE__ */ React62.createElement("div", { onClick: () => canManage && !isSubmitting && setShowTypeModal(true), className: `flex items-center relative w-full border-b border-stone-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}` }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: File02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React62.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, activeTypeObj?.label || "Select Type..."))), canManage && /* @__PURE__ */ React62.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React62.createElement(ThreeDActionButton, { type: "submit", disabled: isSubmitting || !selectedTypeKey || creationMode === "EXISTING" && !selectedCompanyId || creationMode === "NEW" && newCompanyName.length < 2, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Create Application")))), showTypeModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowTypeModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight " }, "Application Type"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowTypeModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-2" }, applicationTypesMeta.map((item) => {
|
|
7598
7608
|
const isSelected = selectedTypeKey === item.key;
|
|
7599
7609
|
return /* @__PURE__ */ React62.createElement(
|
|
7600
7610
|
"div",
|
|
@@ -7605,15 +7615,15 @@ var UniversalCreateApplication = ({
|
|
|
7605
7615
|
},
|
|
7606
7616
|
className: `p-4 rounded-xl cursor-pointer transition-all border ${isSelected ? "bg-white border-[#d97757]" : "bg-stone-50 border-transparent hover:bg-stone-100/60"}`
|
|
7607
7617
|
},
|
|
7608
|
-
/* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React62.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ React62.createElement(
|
|
7618
|
+
/* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React62.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] shrink-0" })),
|
|
7609
7619
|
/* @__PURE__ */ React62.createElement("p", { className: "text-[11px] text-stone-500 mt-1 leading-relaxed whitespace-normal wrap-break-word" }, item.desc)
|
|
7610
7620
|
);
|
|
7611
|
-
})))), showCompaniesModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(
|
|
7621
|
+
})))), showCompaniesModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Search01Icon10, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon32, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ React62.createElement("div", { key: comp.id, onClick: () => {
|
|
7612
7622
|
setSelectedCompanyId(comp.id);
|
|
7613
|
-
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest uppercase" }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest uppercase" }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(
|
|
7623
|
+
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest uppercase" }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest uppercase" }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon26, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowRight01Icon19, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React62.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Search01Icon10, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon32, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
7614
7624
|
const isChecked = selectedParticipants.has(member.userId);
|
|
7615
|
-
return /* @__PURE__ */ React62.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React62.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React62.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ React62.createElement(
|
|
7616
|
-
})), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(
|
|
7625
|
+
return /* @__PURE__ */ React62.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React62.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React62.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Tick02Icon5, size: 14, className: "text-white" }))));
|
|
7626
|
+
})), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon26, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowRight01Icon19, size: 12 })))))));
|
|
7617
7627
|
};
|
|
7618
7628
|
export {
|
|
7619
7629
|
AppBento2,
|