@carlonicora/nextjs-jsonapi 1.116.0 → 1.117.1
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/{AssistantMessageInterface-Ca0G0vZw.d.mts → AssistantMessageInterface-DH1QwtC_.d.mts} +1 -0
- package/dist/{AssistantMessageInterface-DEZ5AnVl.d.ts → AssistantMessageInterface-giWvsOrX.d.ts} +1 -0
- package/dist/{BlockNoteEditor-R6U4PCQ7.js → BlockNoteEditor-CEWZCORH.js} +9 -9
- package/dist/{BlockNoteEditor-R6U4PCQ7.js.map → BlockNoteEditor-CEWZCORH.js.map} +1 -1
- package/dist/{BlockNoteEditor-RFRK3STN.mjs → BlockNoteEditor-K4T6QOJO.mjs} +2 -2
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-SPRFCAQI.js → chunk-56QAXZKI.js} +470 -328
- package/dist/chunk-56QAXZKI.js.map +1 -0
- package/dist/{chunk-RKUUGCYB.mjs → chunk-6D4GJHLK.mjs} +526 -384
- package/dist/chunk-6D4GJHLK.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +69 -22
- package/dist/components/index.d.ts +69 -22
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/contexts/index.d.mts +1 -1
- package/dist/contexts/index.d.ts +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/features/help/index.js +30 -30
- package/dist/features/help/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/forms/CommonDeleter.tsx +49 -18
- package/src/components/forms/CommonEditorButtons.tsx +4 -2
- package/src/components/forms/CommonEditorHeader.tsx +20 -14
- package/src/components/forms/CommonEditorTrigger.tsx +18 -4
- package/src/components/forms/DateRangeSelector.tsx +55 -19
- package/src/components/forms/EditorSheet.tsx +36 -9
- package/src/components/forms/FileUploader.tsx +51 -21
- package/src/components/forms/FormDate.tsx +6 -2
- package/src/components/forms/FormDateTime.tsx +11 -2
- package/src/components/forms/FormFieldWrapper.tsx +3 -1
- package/src/components/forms/FormInput.tsx +3 -1
- package/src/components/forms/FormPassword.tsx +10 -1
- package/src/components/forms/FormPlaceAutocomplete.tsx +8 -3
- package/src/components/forms/FormSelect.tsx +3 -0
- package/src/components/forms/FormSlider.tsx +3 -1
- package/src/components/forms/FormTextarea.tsx +15 -1
- package/src/components/navigations/Breadcrumb.tsx +31 -5
- package/src/hooks/useSocket.ts +12 -1
- package/src/interfaces/breadcrumb.item.data.interface.ts +1 -0
- package/src/shadcnui/ui/badge.tsx +15 -0
- package/dist/chunk-RKUUGCYB.mjs.map +0 -1
- package/dist/chunk-SPRFCAQI.js.map +0 -1
- /package/dist/{BlockNoteEditor-RFRK3STN.mjs.map → BlockNoteEditor-K4T6QOJO.mjs.map} +0 -0
|
@@ -499,7 +499,19 @@ var badgeVariants = cva3(
|
|
|
499
499
|
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
|
|
500
500
|
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",
|
|
501
501
|
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
502
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
502
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
503
|
+
warning: "bg-warning text-warning-foreground [a]:hover:bg-warning/80",
|
|
504
|
+
blue: "bg-sky-500 text-primary-foreground [a]:hover:bg-sky-500/80",
|
|
505
|
+
green: "bg-emerald-500 text-primary-foreground [a]:hover:bg-emerald-500/80",
|
|
506
|
+
red: "bg-red-500 text-primary-foreground [a]:hover:bg-red-500/80",
|
|
507
|
+
yellow: "bg-yellow-500 text-primary-foreground [a]:hover:bg-yellow-500/80",
|
|
508
|
+
purple: "bg-purple-500 text-primary-foreground [a]:hover:bg-purple-500/80",
|
|
509
|
+
pink: "bg-pink-500 text-primary-foreground [a]:hover:bg-pink-500/80",
|
|
510
|
+
gray: "bg-gray-500 text-primary-foreground [a]:hover:bg-gray-500/80",
|
|
511
|
+
orange: "bg-orange-500 text-primary-foreground [a]:hover:bg-orange-500/80",
|
|
512
|
+
teal: "bg-teal-500 text-primary-foreground [a]:hover:bg-teal-500/80",
|
|
513
|
+
lime: "bg-lime-500 text-primary-foreground [a]:hover:bg-lime-500/80",
|
|
514
|
+
none: "border-input bg-transparent text-muted-foreground min-w-20 min-h-5"
|
|
503
515
|
}
|
|
504
516
|
},
|
|
505
517
|
defaultVariants: {
|
|
@@ -6138,7 +6150,7 @@ function EntityAvatar({
|
|
|
6138
6150
|
__name(EntityAvatar, "EntityAvatar");
|
|
6139
6151
|
|
|
6140
6152
|
// src/features/company/contexts/CompanyContext.tsx
|
|
6141
|
-
import { useTranslations as
|
|
6153
|
+
import { useTranslations as useTranslations38 } from "next-intl";
|
|
6142
6154
|
import { Fragment as Fragment19, createContext as createContext9, useContext as useContext10, useState as useState34 } from "react";
|
|
6143
6155
|
|
|
6144
6156
|
// src/hooks/TableGeneratorRegistry.ts
|
|
@@ -7431,7 +7443,15 @@ function useSocket({ token }) {
|
|
|
7431
7443
|
});
|
|
7432
7444
|
}, "handleMessage");
|
|
7433
7445
|
const handleNotification = /* @__PURE__ */ __name((data) => {
|
|
7434
|
-
const
|
|
7446
|
+
const resource = data?.data ?? data?.jsonApi;
|
|
7447
|
+
if (!resource?.type) {
|
|
7448
|
+
console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
|
|
7449
|
+
return;
|
|
7450
|
+
}
|
|
7451
|
+
const notification = rehydrate(Modules.Notification, {
|
|
7452
|
+
jsonApi: resource,
|
|
7453
|
+
included: data?.included || []
|
|
7454
|
+
});
|
|
7435
7455
|
if (notification) {
|
|
7436
7456
|
setSocketNotifications((prev) => {
|
|
7437
7457
|
const newNotifications = [...prev, notification];
|
|
@@ -7699,7 +7719,7 @@ function useCurrentUserContext() {
|
|
|
7699
7719
|
__name(useCurrentUserContext, "useCurrentUserContext");
|
|
7700
7720
|
|
|
7701
7721
|
// src/features/user/contexts/UserContext.tsx
|
|
7702
|
-
import { useTranslations as
|
|
7722
|
+
import { useTranslations as useTranslations21 } from "next-intl";
|
|
7703
7723
|
import { createContext as createContext8, useContext as useContext9, useState as useState31 } from "react";
|
|
7704
7724
|
|
|
7705
7725
|
// src/features/user/components/forms/RoleUserAdd.tsx
|
|
@@ -8161,6 +8181,7 @@ function FormFieldWrapper({
|
|
|
8161
8181
|
description,
|
|
8162
8182
|
isRequired,
|
|
8163
8183
|
orientation = "vertical",
|
|
8184
|
+
className,
|
|
8164
8185
|
children,
|
|
8165
8186
|
testId
|
|
8166
8187
|
}) {
|
|
@@ -8169,7 +8190,7 @@ function FormFieldWrapper({
|
|
|
8169
8190
|
{
|
|
8170
8191
|
control: form.control,
|
|
8171
8192
|
name,
|
|
8172
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ jsxs30(Field, { orientation, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
|
|
8193
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsxs30(Field, { orientation, className, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
|
|
8173
8194
|
label && /* @__PURE__ */ jsxs30(FieldLabel, { children: [
|
|
8174
8195
|
label,
|
|
8175
8196
|
isRequired && /* @__PURE__ */ jsx59("span", { className: "text-destructive ml-1 font-semibold", children: "*" })
|
|
@@ -8568,7 +8589,7 @@ __name(UserResentInvitationEmail, "UserResentInvitationEmail");
|
|
|
8568
8589
|
|
|
8569
8590
|
// src/features/user/components/forms/UserSelector.tsx
|
|
8570
8591
|
import { CircleX, RefreshCwIcon as RefreshCwIcon2, SearchIcon as SearchIcon4, XIcon as XIcon8 } from "lucide-react";
|
|
8571
|
-
import { useTranslations as
|
|
8592
|
+
import { useTranslations as useTranslations20 } from "next-intl";
|
|
8572
8593
|
import { useCallback as useCallback18, useEffect as useEffect27, useRef as useRef18, useState as useState30 } from "react";
|
|
8573
8594
|
|
|
8574
8595
|
// src/components/forms/CommonAssociationForm.tsx
|
|
@@ -8721,7 +8742,19 @@ __name(errorToast, "errorToast");
|
|
|
8721
8742
|
|
|
8722
8743
|
// src/components/forms/CommonDeleter.tsx
|
|
8723
8744
|
import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8724
|
-
function CommonDeleter({
|
|
8745
|
+
function CommonDeleter({
|
|
8746
|
+
deleteFunction,
|
|
8747
|
+
redirectTo,
|
|
8748
|
+
type,
|
|
8749
|
+
title,
|
|
8750
|
+
subtitle,
|
|
8751
|
+
description,
|
|
8752
|
+
forceShow,
|
|
8753
|
+
testId,
|
|
8754
|
+
trigger,
|
|
8755
|
+
onSuccess,
|
|
8756
|
+
propagateChanges
|
|
8757
|
+
}) {
|
|
8725
8758
|
const t = useI18nTranslations();
|
|
8726
8759
|
const router = useI18nRouter();
|
|
8727
8760
|
const [open, setOpen] = useState17(forceShow || false);
|
|
@@ -8733,13 +8766,14 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow, testId, on
|
|
|
8733
8766
|
setOpen(false);
|
|
8734
8767
|
if (onSuccess) await onSuccess();
|
|
8735
8768
|
else if (redirectTo) router.push(redirectTo);
|
|
8769
|
+
if (propagateChanges) propagateChanges();
|
|
8736
8770
|
} catch (error) {
|
|
8737
8771
|
errorToast({ title: t(`common.errors.delete`), error });
|
|
8738
8772
|
}
|
|
8739
8773
|
setIsDeleting(false);
|
|
8740
8774
|
}, "handleDelete");
|
|
8741
8775
|
return /* @__PURE__ */ jsxs37(AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
8742
|
-
forceShow ? null : /* @__PURE__ */ jsx66(AlertDialogTrigger, { children: /* @__PURE__ */ jsx66(
|
|
8776
|
+
forceShow ? null : /* @__PURE__ */ jsx66(AlertDialogTrigger, { children: trigger || /* @__PURE__ */ jsx66(
|
|
8743
8777
|
Button,
|
|
8744
8778
|
{
|
|
8745
8779
|
render: /* @__PURE__ */ jsx66("div", {}),
|
|
@@ -8753,10 +8787,10 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow, testId, on
|
|
|
8753
8787
|
) }),
|
|
8754
8788
|
/* @__PURE__ */ jsxs37(AlertDialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
8755
8789
|
/* @__PURE__ */ jsxs37(AlertDialogHeader, { children: [
|
|
8756
|
-
/* @__PURE__ */ jsx66(AlertDialogTitle, { children: t(`common.delete.title`, { type: t(`entities.${type}`, { count: 1 }) }) }),
|
|
8757
|
-
/* @__PURE__ */ jsx66(AlertDialogDescription, { children: t(`common.delete.subtitle`, { type: t(`entities.${type}`, { count: 1 }) }) })
|
|
8790
|
+
/* @__PURE__ */ jsx66(AlertDialogTitle, { children: title ?? t(`common.delete.title`, { type: t(`entities.${type}`, { count: 1 }) }) }),
|
|
8791
|
+
/* @__PURE__ */ jsx66(AlertDialogDescription, { children: subtitle ?? t(`common.delete.subtitle`, { type: t(`entities.${type}`, { count: 1 }) }) })
|
|
8758
8792
|
] }),
|
|
8759
|
-
/* @__PURE__ */ jsx66("div", { className: "text-destructive p-4 text-sm", children: t(`common.delete.description`, { type: t(`entities.${type}`, { count: 1 }) }) }),
|
|
8793
|
+
description !== void 0 ? description : /* @__PURE__ */ jsx66("div", { className: "text-destructive p-4 text-sm", children: t(`common.delete.description`, { type: t(`entities.${type}`, { count: 1 }) }) }),
|
|
8760
8794
|
/* @__PURE__ */ jsxs37("div", { className: "flex justify-end", children: [
|
|
8761
8795
|
/* @__PURE__ */ jsx66(
|
|
8762
8796
|
Button,
|
|
@@ -8800,14 +8834,15 @@ function CommonEditorButtons({
|
|
|
8800
8834
|
disabled,
|
|
8801
8835
|
setOpen,
|
|
8802
8836
|
hideSubmit,
|
|
8803
|
-
centerButtons
|
|
8837
|
+
centerButtons,
|
|
8838
|
+
buttonTitle
|
|
8804
8839
|
}) {
|
|
8805
8840
|
const t = useTranslations9();
|
|
8806
8841
|
if (centerButtons) {
|
|
8807
8842
|
return /* @__PURE__ */ jsxs38("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
|
|
8808
8843
|
/* @__PURE__ */ jsx67(Button, { variant: "outline", type: `button`, onClick: () => setOpen(false), "data-testid": `modal-button-cancel`, children: t(`ui.buttons.cancel`) }),
|
|
8809
8844
|
/* @__PURE__ */ jsx67("div", { className: "flex flex-1 justify-center gap-x-2", children: centerButtons }),
|
|
8810
|
-
!hideSubmit ? /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) }) : /* @__PURE__ */ jsx67("div", {})
|
|
8845
|
+
!hideSubmit ? /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) }) : /* @__PURE__ */ jsx67("div", {})
|
|
8811
8846
|
] });
|
|
8812
8847
|
}
|
|
8813
8848
|
return /* @__PURE__ */ jsxs38("div", { className: "flex justify-end", children: [
|
|
@@ -8822,7 +8857,7 @@ function CommonEditorButtons({
|
|
|
8822
8857
|
children: t(`ui.buttons.cancel`)
|
|
8823
8858
|
}
|
|
8824
8859
|
),
|
|
8825
|
-
!hideSubmit && /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
|
|
8860
|
+
!hideSubmit && /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
|
|
8826
8861
|
] });
|
|
8827
8862
|
}
|
|
8828
8863
|
__name(CommonEditorButtons, "CommonEditorButtons");
|
|
@@ -8830,13 +8865,13 @@ __name(CommonEditorButtons, "CommonEditorButtons");
|
|
|
8830
8865
|
// src/components/forms/CommonEditorHeader.tsx
|
|
8831
8866
|
import { useTranslations as useTranslations10 } from "next-intl";
|
|
8832
8867
|
import { jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8833
|
-
function CommonEditorHeader({ type, name }) {
|
|
8868
|
+
function CommonEditorHeader({ type, name, title, description }) {
|
|
8834
8869
|
const t = useTranslations10();
|
|
8835
8870
|
return /* @__PURE__ */ jsxs39(DialogHeader, { children: [
|
|
8836
|
-
/* @__PURE__ */ jsx68(DialogTitle, { children: name ? t(`common.edit.update.title`, {
|
|
8871
|
+
/* @__PURE__ */ jsx68(DialogTitle, { children: title ? title : name ? t(`common.edit.update.title`, {
|
|
8837
8872
|
type
|
|
8838
8873
|
}) : t(`common.edit.create.title`, { type }) }),
|
|
8839
|
-
/* @__PURE__ */ jsx68(DialogDescription, { children: name ? t(`common.edit.update.description`, {
|
|
8874
|
+
/* @__PURE__ */ jsx68(DialogDescription, { children: description ? description : name ? t(`common.edit.update.description`, {
|
|
8840
8875
|
type,
|
|
8841
8876
|
name
|
|
8842
8877
|
}) : t(`common.edit.create.description`, {
|
|
@@ -8865,12 +8900,13 @@ function CommonEditorDiscardDialog({ open, onOpenChange, onDiscard }) {
|
|
|
8865
8900
|
__name(CommonEditorDiscardDialog, "CommonEditorDiscardDialog");
|
|
8866
8901
|
|
|
8867
8902
|
// src/components/forms/CommonEditorTrigger.tsx
|
|
8868
|
-
import { PencilIcon } from "lucide-react";
|
|
8903
|
+
import { PencilIcon, PlusCircleIcon } from "lucide-react";
|
|
8869
8904
|
import { useTranslations as useTranslations12 } from "next-intl";
|
|
8905
|
+
import React15 from "react";
|
|
8870
8906
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
8871
|
-
function CommonEditorTrigger({ isEdit, edit: _edit, create, testId }) {
|
|
8907
|
+
function CommonEditorTrigger({ isEdit, edit: _edit, create, testId, title }) {
|
|
8872
8908
|
const t = useTranslations12();
|
|
8873
|
-
return /* @__PURE__ */ jsx70(DialogTrigger, { children: isEdit ? /* @__PURE__ */ jsx70(
|
|
8909
|
+
return /* @__PURE__ */ jsx70(DialogTrigger, { children: title ? /* @__PURE__ */ jsx70(Button, { render: /* @__PURE__ */ jsx70("div", {}), nativeButton: false, size: "sm", variant: `outline`, "data-testid": testId, children: title }) : isEdit ? /* @__PURE__ */ jsx70(
|
|
8874
8910
|
Button,
|
|
8875
8911
|
{
|
|
8876
8912
|
render: /* @__PURE__ */ jsx70("div", {}),
|
|
@@ -8884,6 +8920,10 @@ function CommonEditorTrigger({ isEdit, edit: _edit, create, testId }) {
|
|
|
8884
8920
|
) : /* @__PURE__ */ jsx70(Button, { render: /* @__PURE__ */ jsx70("div", {}), nativeButton: false, size: "sm", variant: `outline`, "data-testid": testId, children: create ? create : t(`ui.buttons.create`) }) });
|
|
8885
8921
|
}
|
|
8886
8922
|
__name(CommonEditorTrigger, "CommonEditorTrigger");
|
|
8923
|
+
var CommonAddTrigger = React15.forwardRef(
|
|
8924
|
+
(props, ref) => /* @__PURE__ */ jsx70(Button, { ref, variant: "ghost", size: "sm", className: "text-muted-foreground", ...props, children: /* @__PURE__ */ jsx70(PlusCircleIcon, {}) })
|
|
8925
|
+
);
|
|
8926
|
+
CommonAddTrigger.displayName = "CommonAddTrigger";
|
|
8887
8927
|
|
|
8888
8928
|
// src/components/forms/useEditorDialog.ts
|
|
8889
8929
|
import { useCallback as useCallback14, useEffect as useEffect19, useState as useState18 } from "react";
|
|
@@ -8982,6 +9022,7 @@ function EditorSheet({
|
|
|
8982
9022
|
onClose,
|
|
8983
9023
|
dialogOpen,
|
|
8984
9024
|
onDialogOpenChange,
|
|
9025
|
+
renderFooter,
|
|
8985
9026
|
children
|
|
8986
9027
|
}) {
|
|
8987
9028
|
const t = useTranslations13();
|
|
@@ -9031,7 +9072,7 @@ function EditorSheet({
|
|
|
9031
9072
|
);
|
|
9032
9073
|
return /* @__PURE__ */ jsxs41(Fragment9, { children: [
|
|
9033
9074
|
/* @__PURE__ */ jsxs41(Sheet, { open, onOpenChange: handleOpenChange, children: [
|
|
9034
|
-
dialogOpen === void 0 && (trigger ? /* @__PURE__ */ jsx71(SheetTrigger, { children: trigger }) : /* @__PURE__ */ jsx71(SheetTrigger, { children: isEdit ? /* @__PURE__ */ jsx71(
|
|
9075
|
+
dialogOpen === void 0 && forceShow === void 0 && (trigger ? /* @__PURE__ */ jsx71(SheetTrigger, { children: trigger }) : /* @__PURE__ */ jsx71(SheetTrigger, { children: isEdit ? /* @__PURE__ */ jsx71(
|
|
9035
9076
|
Button,
|
|
9036
9077
|
{
|
|
9037
9078
|
render: /* @__PURE__ */ jsx71("div", {}),
|
|
@@ -9047,20 +9088,30 @@ function EditorSheet({
|
|
|
9047
9088
|
/* @__PURE__ */ jsx71(SheetTitle, { children: titleOverride ?? (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType })) }),
|
|
9048
9089
|
/* @__PURE__ */ jsx71(SheetDescription, { children: descriptionOverride ?? (isEdit ? t("common.edit.update.description", { type: entityType, name: entityName ?? "" }) : t("common.edit.create.description", { type: entityType })) })
|
|
9049
9090
|
] }),
|
|
9050
|
-
/* @__PURE__ */ jsx71(Form, { ...form, children: /* @__PURE__ */ jsxs41(
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
form
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9091
|
+
/* @__PURE__ */ jsx71(Form, { ...form, children: /* @__PURE__ */ jsxs41(
|
|
9092
|
+
"form",
|
|
9093
|
+
{
|
|
9094
|
+
onSubmit: (e) => {
|
|
9095
|
+
e.stopPropagation();
|
|
9096
|
+
return form.handleSubmit(wrappedOnSubmit)(e);
|
|
9097
|
+
},
|
|
9098
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
9099
|
+
children: [
|
|
9100
|
+
/* @__PURE__ */ jsx71("div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
|
|
9101
|
+
/* @__PURE__ */ jsx71(SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: renderFooter ? renderFooter({ form, isEdit, setOpen: handleOpenChange, closeWithoutConfirm: setOpen }) : /* @__PURE__ */ jsx71(
|
|
9102
|
+
CommonEditorButtons,
|
|
9103
|
+
{
|
|
9104
|
+
form,
|
|
9105
|
+
setOpen: handleOpenChange,
|
|
9106
|
+
isEdit,
|
|
9107
|
+
disabled,
|
|
9108
|
+
hideSubmit,
|
|
9109
|
+
centerButtons
|
|
9110
|
+
}
|
|
9111
|
+
) })
|
|
9112
|
+
]
|
|
9113
|
+
}
|
|
9114
|
+
) })
|
|
9064
9115
|
] })
|
|
9065
9116
|
] }),
|
|
9066
9117
|
/* @__PURE__ */ jsx71(CommonEditorDiscardDialog, { ...discardDialogProps })
|
|
@@ -9232,9 +9283,11 @@ var DatePickerPopover = /* @__PURE__ */ __name(({
|
|
|
9232
9283
|
// src/components/forms/DateRangeSelector.tsx
|
|
9233
9284
|
import { format } from "date-fns";
|
|
9234
9285
|
import { CalendarIcon as CalendarIcon2 } from "lucide-react";
|
|
9286
|
+
import { useTranslations as useTranslations14 } from "next-intl";
|
|
9235
9287
|
import { useEffect as useEffect21, useState as useState20 } from "react";
|
|
9236
9288
|
import { Fragment as Fragment10, jsx as jsx73, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9237
9289
|
function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth }) {
|
|
9290
|
+
const t = useTranslations14();
|
|
9238
9291
|
const [date, setDate] = useState20(
|
|
9239
9292
|
avoidSettingDates ? void 0 : {
|
|
9240
9293
|
from: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1),
|
|
@@ -9242,6 +9295,10 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9242
9295
|
}
|
|
9243
9296
|
);
|
|
9244
9297
|
const [open, setOpen] = useState20(false);
|
|
9298
|
+
const [mounted, setMounted] = useState20(false);
|
|
9299
|
+
useEffect21(() => {
|
|
9300
|
+
setMounted(true);
|
|
9301
|
+
}, []);
|
|
9245
9302
|
const [prevRange, setPrevRange] = useState20(date);
|
|
9246
9303
|
useEffect21(() => {
|
|
9247
9304
|
if (date?.from && date?.to && date.to > date.from && (prevRange?.from?.getTime() !== date.from.getTime() || prevRange?.to?.getTime() !== date.to.getTime())) {
|
|
@@ -9261,8 +9318,8 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9261
9318
|
setDate(range);
|
|
9262
9319
|
}
|
|
9263
9320
|
}, "handleSelect");
|
|
9264
|
-
|
|
9265
|
-
/* @__PURE__ */ jsx73(
|
|
9321
|
+
if (!mounted) {
|
|
9322
|
+
return /* @__PURE__ */ jsx73("div", { className: cn("grid gap-2"), children: /* @__PURE__ */ jsxs43(
|
|
9266
9323
|
Button,
|
|
9267
9324
|
{
|
|
9268
9325
|
id: "date",
|
|
@@ -9274,10 +9331,33 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9274
9331
|
format(date.from, "LLL dd, y"),
|
|
9275
9332
|
" - ",
|
|
9276
9333
|
format(date.to, "LLL dd, y")
|
|
9277
|
-
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx73("span", { children: "
|
|
9334
|
+
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx73("span", { children: t("ui.labels.pick_a_date") })
|
|
9278
9335
|
]
|
|
9279
9336
|
}
|
|
9280
|
-
) })
|
|
9337
|
+
) });
|
|
9338
|
+
}
|
|
9339
|
+
return /* @__PURE__ */ jsx73("div", { className: cn("grid gap-2"), children: /* @__PURE__ */ jsxs43(Popover, { open, onOpenChange: setOpen, children: [
|
|
9340
|
+
/* @__PURE__ */ jsxs43(
|
|
9341
|
+
PopoverTrigger,
|
|
9342
|
+
{
|
|
9343
|
+
render: /* @__PURE__ */ jsx73(
|
|
9344
|
+
Button,
|
|
9345
|
+
{
|
|
9346
|
+
id: "date",
|
|
9347
|
+
variant: "outline",
|
|
9348
|
+
className: cn("w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground")
|
|
9349
|
+
}
|
|
9350
|
+
),
|
|
9351
|
+
children: [
|
|
9352
|
+
/* @__PURE__ */ jsx73(CalendarIcon2, {}),
|
|
9353
|
+
date?.from ? date.to ? /* @__PURE__ */ jsxs43(Fragment10, { children: [
|
|
9354
|
+
format(date.from, "LLL dd, y"),
|
|
9355
|
+
" - ",
|
|
9356
|
+
format(date.to, "LLL dd, y")
|
|
9357
|
+
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx73("span", { children: t("ui.labels.pick_a_date") })
|
|
9358
|
+
]
|
|
9359
|
+
}
|
|
9360
|
+
),
|
|
9281
9361
|
/* @__PURE__ */ jsx73(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
9282
9362
|
/* @__PURE__ */ jsx73(
|
|
9283
9363
|
Calendar,
|
|
@@ -9302,7 +9382,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9302
9382
|
},
|
|
9303
9383
|
className: "cursor-pointer",
|
|
9304
9384
|
disabled: !date,
|
|
9305
|
-
children: "
|
|
9385
|
+
children: t("ui.buttons.clear")
|
|
9306
9386
|
}
|
|
9307
9387
|
)
|
|
9308
9388
|
] }) })
|
|
@@ -9312,13 +9392,14 @@ __name(DateRangeSelector, "DateRangeSelector");
|
|
|
9312
9392
|
|
|
9313
9393
|
// src/components/forms/FileUploader.tsx
|
|
9314
9394
|
import { Trash2 as RemoveIcon } from "lucide-react";
|
|
9315
|
-
import { useTranslations as
|
|
9395
|
+
import { useTranslations as useTranslations15 } from "next-intl";
|
|
9316
9396
|
import {
|
|
9317
9397
|
createContext as createContext7,
|
|
9318
9398
|
forwardRef as forwardRef6,
|
|
9319
9399
|
useCallback as useCallback16,
|
|
9320
9400
|
useContext as useContext8,
|
|
9321
9401
|
useEffect as useEffect22,
|
|
9402
|
+
useMemo as useMemo12,
|
|
9322
9403
|
useRef as useRef14,
|
|
9323
9404
|
useState as useState21
|
|
9324
9405
|
} from "react";
|
|
@@ -9338,7 +9419,7 @@ var FileUploader = forwardRef6(
|
|
|
9338
9419
|
const [isLOF, setIsLOF] = useState21(false);
|
|
9339
9420
|
const [activeIndex, setActiveIndex] = useState21(-1);
|
|
9340
9421
|
const { maxFiles = 1, maxSize = 4 * 1024 * 1024, multiple = true } = dropzoneOptions;
|
|
9341
|
-
const t =
|
|
9422
|
+
const t = useTranslations15();
|
|
9342
9423
|
const reSelectAll = maxFiles === 1 ? true : reSelect;
|
|
9343
9424
|
const direction = dir === "rtl" ? "rtl" : "ltr";
|
|
9344
9425
|
const removeFileFromSet = useCallback16(
|
|
@@ -9451,7 +9532,8 @@ var FileUploader = forwardRef6(
|
|
|
9451
9532
|
activeIndex,
|
|
9452
9533
|
setActiveIndex,
|
|
9453
9534
|
orientation,
|
|
9454
|
-
direction
|
|
9535
|
+
direction,
|
|
9536
|
+
accept: dropzoneOptions.accept
|
|
9455
9537
|
},
|
|
9456
9538
|
children: /* @__PURE__ */ jsx74(
|
|
9457
9539
|
"div",
|
|
@@ -9503,7 +9585,7 @@ var FileUploaderItem = forwardRef6(
|
|
|
9503
9585
|
({ className, index, children, ...props }, ref) => {
|
|
9504
9586
|
const { removeFileFromSet, activeIndex, direction } = useFileUpload();
|
|
9505
9587
|
const isSelected = index === activeIndex;
|
|
9506
|
-
const t =
|
|
9588
|
+
const t = useTranslations15();
|
|
9507
9589
|
return /* @__PURE__ */ jsxs44(
|
|
9508
9590
|
"div",
|
|
9509
9591
|
{
|
|
@@ -9537,9 +9619,41 @@ var FileUploaderItem = forwardRef6(
|
|
|
9537
9619
|
FileUploaderItem.displayName = "FileUploaderItem";
|
|
9538
9620
|
var FileInput = forwardRef6(
|
|
9539
9621
|
({ className, children, ...props }, ref) => {
|
|
9540
|
-
const { dropzoneState, isFileTooBig, isLOF } = useFileUpload();
|
|
9622
|
+
const { dropzoneState, isFileTooBig, isLOF, accept } = useFileUpload();
|
|
9623
|
+
const t = useTranslations15();
|
|
9541
9624
|
const rootProps = isLOF ? {} : dropzoneState.getRootProps();
|
|
9542
9625
|
const { isDragActive: parentIsDragActive } = dropzoneState;
|
|
9626
|
+
const acceptedLabels = useMemo12(() => {
|
|
9627
|
+
if (!accept) return null;
|
|
9628
|
+
const extensions = /* @__PURE__ */ new Set();
|
|
9629
|
+
let hasWildcardImages = false;
|
|
9630
|
+
for (const [mime, exts] of Object.entries(accept)) {
|
|
9631
|
+
if (mime === "image/*") hasWildcardImages = true;
|
|
9632
|
+
for (const ext of exts) extensions.add(ext);
|
|
9633
|
+
}
|
|
9634
|
+
const labels = Array.from(extensions).sort();
|
|
9635
|
+
if (hasWildcardImages) labels.push(t("ui.labels.images"));
|
|
9636
|
+
return labels.length > 0 ? labels : null;
|
|
9637
|
+
}, [accept, t]);
|
|
9638
|
+
const dropArea = /* @__PURE__ */ jsx74(
|
|
9639
|
+
"div",
|
|
9640
|
+
{
|
|
9641
|
+
className: cn(
|
|
9642
|
+
"w-full rounded-lg duration-300 ease-in-out",
|
|
9643
|
+
// Simpler border logic: if parent is drag-active, it controls the border.
|
|
9644
|
+
// Otherwise, FileInput can show its own accept/reject/default border.
|
|
9645
|
+
{
|
|
9646
|
+
"border-green-500": dropzoneState.isDragAccept && !parentIsDragActive,
|
|
9647
|
+
"border-red-500": (dropzoneState.isDragReject || isFileTooBig) && !parentIsDragActive,
|
|
9648
|
+
"border-gray-300": !dropzoneState.isDragAccept && !dropzoneState.isDragReject && !isFileTooBig && !parentIsDragActive
|
|
9649
|
+
},
|
|
9650
|
+
// className from props should be last to allow overrides if necessary
|
|
9651
|
+
className
|
|
9652
|
+
),
|
|
9653
|
+
...rootProps,
|
|
9654
|
+
children
|
|
9655
|
+
}
|
|
9656
|
+
);
|
|
9543
9657
|
return /* @__PURE__ */ jsxs44(
|
|
9544
9658
|
"div",
|
|
9545
9659
|
{
|
|
@@ -9547,25 +9661,14 @@ var FileInput = forwardRef6(
|
|
|
9547
9661
|
...props,
|
|
9548
9662
|
className: cn(`relative w-full ${isLOF ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`, className),
|
|
9549
9663
|
children: [
|
|
9550
|
-
/* @__PURE__ */
|
|
9551
|
-
|
|
9552
|
-
{
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
"border-green-500": dropzoneState.isDragAccept && !parentIsDragActive,
|
|
9559
|
-
"border-red-500": (dropzoneState.isDragReject || isFileTooBig) && !parentIsDragActive,
|
|
9560
|
-
"border-gray-300": !dropzoneState.isDragAccept && !dropzoneState.isDragReject && !isFileTooBig && !parentIsDragActive
|
|
9561
|
-
},
|
|
9562
|
-
// className from props should be last to allow overrides if necessary
|
|
9563
|
-
className
|
|
9564
|
-
),
|
|
9565
|
-
...rootProps,
|
|
9566
|
-
children
|
|
9567
|
-
}
|
|
9568
|
-
),
|
|
9664
|
+
acceptedLabels ? /* @__PURE__ */ jsxs44(Tooltip2, { children: [
|
|
9665
|
+
/* @__PURE__ */ jsx74(TooltipTrigger, { render: dropArea }),
|
|
9666
|
+
/* @__PURE__ */ jsxs44(TooltipContent, { children: [
|
|
9667
|
+
t("ui.labels.accepted_file_types"),
|
|
9668
|
+
": ",
|
|
9669
|
+
acceptedLabels.join(", ")
|
|
9670
|
+
] })
|
|
9671
|
+
] }) : dropArea,
|
|
9569
9672
|
/* @__PURE__ */ jsx74(
|
|
9570
9673
|
Input,
|
|
9571
9674
|
{
|
|
@@ -9689,12 +9792,12 @@ import { useRef as useRef15 } from "react";
|
|
|
9689
9792
|
|
|
9690
9793
|
// src/components/editors/BlockNoteEditorContainer.tsx
|
|
9691
9794
|
import dynamic from "next/dynamic";
|
|
9692
|
-
import
|
|
9795
|
+
import React17 from "react";
|
|
9693
9796
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
9694
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9797
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-K4T6QOJO.mjs"), {
|
|
9695
9798
|
ssr: false
|
|
9696
9799
|
});
|
|
9697
|
-
var BlockNoteEditorContainer =
|
|
9800
|
+
var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
9698
9801
|
return /* @__PURE__ */ jsx77(BlockNoteEditor, { ...props });
|
|
9699
9802
|
}, "EditorContainer"));
|
|
9700
9803
|
|
|
@@ -9785,7 +9888,7 @@ __name(FormBlockNote, "FormBlockNote");
|
|
|
9785
9888
|
// src/components/forms/FormDate.tsx
|
|
9786
9889
|
import { isValid as isValid2, parse as parse2 } from "date-fns";
|
|
9787
9890
|
import { Calendar as CalendarIcon3, CircleXIcon as CircleXIcon2 } from "lucide-react";
|
|
9788
|
-
import { useMemo as
|
|
9891
|
+
import { useMemo as useMemo13, useState as useState23 } from "react";
|
|
9789
9892
|
import { jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9790
9893
|
function FormDate({
|
|
9791
9894
|
form,
|
|
@@ -9795,7 +9898,9 @@ function FormDate({
|
|
|
9795
9898
|
onChange,
|
|
9796
9899
|
isRequired = false,
|
|
9797
9900
|
defaultMonth,
|
|
9798
|
-
allowEmpty
|
|
9901
|
+
allowEmpty,
|
|
9902
|
+
description,
|
|
9903
|
+
futureYears
|
|
9799
9904
|
}) {
|
|
9800
9905
|
const t = useI18nTranslations();
|
|
9801
9906
|
const locale = useI18nLocale();
|
|
@@ -9805,12 +9910,12 @@ function FormDate({
|
|
|
9805
9910
|
const currentValue = form.getValues(id);
|
|
9806
9911
|
return currentValue || defaultMonth || /* @__PURE__ */ new Date();
|
|
9807
9912
|
});
|
|
9808
|
-
const dateFormatter =
|
|
9913
|
+
const dateFormatter = useMemo13(
|
|
9809
9914
|
() => new Intl.DateTimeFormat(locale, { day: "2-digit", month: "2-digit", year: "numeric" }),
|
|
9810
9915
|
[locale]
|
|
9811
9916
|
);
|
|
9812
9917
|
const formatDate = /* @__PURE__ */ __name((date) => dateFormatter.format(date), "formatDate");
|
|
9813
|
-
const datePlaceholder =
|
|
9918
|
+
const datePlaceholder = useMemo13(() => {
|
|
9814
9919
|
const parts = dateFormatter.formatToParts(new Date(2e3, 0, 1));
|
|
9815
9920
|
return parts.map((part) => {
|
|
9816
9921
|
if (part.type === "day") return "dd";
|
|
@@ -9819,7 +9924,7 @@ function FormDate({
|
|
|
9819
9924
|
return part.value;
|
|
9820
9925
|
}).join("");
|
|
9821
9926
|
}, [dateFormatter]);
|
|
9822
|
-
const dateFormatPattern =
|
|
9927
|
+
const dateFormatPattern = useMemo13(() => {
|
|
9823
9928
|
const parts = dateFormatter.formatToParts(new Date(2e3, 0, 1));
|
|
9824
9929
|
return parts.map((part) => {
|
|
9825
9930
|
if (part.type === "day") return "dd";
|
|
@@ -9854,7 +9959,7 @@ function FormDate({
|
|
|
9854
9959
|
}
|
|
9855
9960
|
if (onChange) onChange(selectedDate);
|
|
9856
9961
|
}, "handleCalendarSelect");
|
|
9857
|
-
return /* @__PURE__ */ jsx79("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx79(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => /* @__PURE__ */ jsxs47(Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
9962
|
+
return /* @__PURE__ */ jsx79("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx79(FormFieldWrapper, { form, name: id, label: name, isRequired, description, children: (field) => /* @__PURE__ */ jsxs47(Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
9858
9963
|
/* @__PURE__ */ jsxs47(InputGroup, { children: [
|
|
9859
9964
|
/* @__PURE__ */ jsx79(
|
|
9860
9965
|
InputGroupInput,
|
|
@@ -9898,7 +10003,7 @@ function FormDate({
|
|
|
9898
10003
|
month: displayMonth,
|
|
9899
10004
|
onMonthChange: setDisplayMonth,
|
|
9900
10005
|
startMonth: new Date(1900, 0),
|
|
9901
|
-
endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11)
|
|
10006
|
+
endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + (futureYears ?? 10), 11)
|
|
9902
10007
|
}
|
|
9903
10008
|
),
|
|
9904
10009
|
allowEmpty !== false && /* @__PURE__ */ jsx79("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx79(
|
|
@@ -9924,7 +10029,7 @@ __name(FormDate, "FormDate");
|
|
|
9924
10029
|
|
|
9925
10030
|
// src/components/forms/FormDateTime.tsx
|
|
9926
10031
|
import { Calendar as CalendarIcon4, CircleXIcon as CircleXIcon3 } from "lucide-react";
|
|
9927
|
-
import { useMemo as
|
|
10032
|
+
import { useMemo as useMemo14, useState as useState24 } from "react";
|
|
9928
10033
|
import { jsx as jsx80, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9929
10034
|
function FormDateTime({
|
|
9930
10035
|
form,
|
|
@@ -9933,7 +10038,10 @@ function FormDateTime({
|
|
|
9933
10038
|
minDate,
|
|
9934
10039
|
onChange,
|
|
9935
10040
|
allowEmpty,
|
|
9936
|
-
defaultMonth
|
|
10041
|
+
defaultMonth,
|
|
10042
|
+
placeholder,
|
|
10043
|
+
isRequired,
|
|
10044
|
+
description
|
|
9937
10045
|
}) {
|
|
9938
10046
|
const [open, setOpen] = useState24(false);
|
|
9939
10047
|
const t = useI18nTranslations();
|
|
@@ -9943,7 +10051,7 @@ function FormDateTime({
|
|
|
9943
10051
|
const currentValue = form.getValues(id);
|
|
9944
10052
|
return currentValue || defaultMonth || /* @__PURE__ */ new Date();
|
|
9945
10053
|
});
|
|
9946
|
-
const dateTimeFormatter =
|
|
10054
|
+
const dateTimeFormatter = useMemo14(
|
|
9947
10055
|
() => new Intl.DateTimeFormat(locale, {
|
|
9948
10056
|
year: "numeric",
|
|
9949
10057
|
month: "long",
|
|
@@ -9985,7 +10093,7 @@ function FormDateTime({
|
|
|
9985
10093
|
if (onChange) onChange(updatedDate);
|
|
9986
10094
|
}
|
|
9987
10095
|
}, "handleTimeChange");
|
|
9988
|
-
return /* @__PURE__ */ jsx80("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx80(FormFieldWrapper, { form, name: id, label: name, children: (field) => /* @__PURE__ */ jsx80("div", { className: "relative flex flex-row", children: /* @__PURE__ */ jsxs48(Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
10096
|
+
return /* @__PURE__ */ jsx80("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx80(FormFieldWrapper, { form, name: id, label: name, isRequired, description, children: (field) => /* @__PURE__ */ jsx80("div", { className: "relative flex flex-row", children: /* @__PURE__ */ jsxs48(Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
9989
10097
|
/* @__PURE__ */ jsxs48("div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
9990
10098
|
/* @__PURE__ */ jsxs48(
|
|
9991
10099
|
PopoverTrigger,
|
|
@@ -9998,7 +10106,7 @@ function FormDateTime({
|
|
|
9998
10106
|
}
|
|
9999
10107
|
),
|
|
10000
10108
|
children: [
|
|
10001
|
-
field.value ? formatDateTime(field.value) : /* @__PURE__ */ jsx80("span", { children: t(`common.pick_date_time`) }),
|
|
10109
|
+
field.value ? formatDateTime(field.value) : /* @__PURE__ */ jsx80("span", { children: placeholder ? placeholder : t(`common.pick_date_time`) }),
|
|
10002
10110
|
/* @__PURE__ */ jsx80(CalendarIcon4, { className: "ml-auto h-4 w-4 opacity-50" })
|
|
10003
10111
|
]
|
|
10004
10112
|
}
|
|
@@ -10126,12 +10234,13 @@ function FormDateTime({
|
|
|
10126
10234
|
__name(FormDateTime, "FormDateTime");
|
|
10127
10235
|
|
|
10128
10236
|
// src/components/forms/FormInput.tsx
|
|
10129
|
-
import { useTranslations as
|
|
10237
|
+
import { useTranslations as useTranslations16 } from "next-intl";
|
|
10130
10238
|
import { jsx as jsx81, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10131
10239
|
function FormInput({
|
|
10132
10240
|
form,
|
|
10133
10241
|
id,
|
|
10134
10242
|
name,
|
|
10243
|
+
description,
|
|
10135
10244
|
placeholder,
|
|
10136
10245
|
type,
|
|
10137
10246
|
onBlur,
|
|
@@ -10142,8 +10251,8 @@ function FormInput({
|
|
|
10142
10251
|
testId,
|
|
10143
10252
|
isRequired = false
|
|
10144
10253
|
}) {
|
|
10145
|
-
const t =
|
|
10146
|
-
return /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx81(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => {
|
|
10254
|
+
const t = useTranslations16();
|
|
10255
|
+
return /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx81(FormFieldWrapper, { form, name: id, label: name, description, isRequired, children: (field) => {
|
|
10147
10256
|
const handleBlur = /* @__PURE__ */ __name(async (e) => {
|
|
10148
10257
|
let value = e.target.value;
|
|
10149
10258
|
if (type === "link" && value) {
|
|
@@ -10210,15 +10319,15 @@ function FormInput({
|
|
|
10210
10319
|
__name(FormInput, "FormInput");
|
|
10211
10320
|
|
|
10212
10321
|
// src/components/forms/PasswordInput.tsx
|
|
10213
|
-
import * as
|
|
10322
|
+
import * as React19 from "react";
|
|
10214
10323
|
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
10215
|
-
import { useTranslations as
|
|
10324
|
+
import { useTranslations as useTranslations17 } from "next-intl";
|
|
10216
10325
|
import { jsx as jsx82, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10217
|
-
var PasswordInput =
|
|
10326
|
+
var PasswordInput = React19.forwardRef(
|
|
10218
10327
|
({ className, type: _type, ...props }, ref) => {
|
|
10219
|
-
const [showPassword, setShowPassword] =
|
|
10328
|
+
const [showPassword, setShowPassword] = React19.useState(false);
|
|
10220
10329
|
const disabled = props.value === "" || props.value === void 0 || props.disabled;
|
|
10221
|
-
const t =
|
|
10330
|
+
const t = useTranslations17();
|
|
10222
10331
|
return /* @__PURE__ */ jsxs50("div", { className: "relative", children: [
|
|
10223
10332
|
/* @__PURE__ */ jsx82(Input, { type: showPassword ? "text" : "password", className: cn("", className), ref, ...props }),
|
|
10224
10333
|
/* @__PURE__ */ jsxs50(
|
|
@@ -10259,19 +10368,31 @@ function FormPassword({
|
|
|
10259
10368
|
onBlur,
|
|
10260
10369
|
disabled,
|
|
10261
10370
|
testId,
|
|
10262
|
-
isRequired
|
|
10371
|
+
isRequired,
|
|
10372
|
+
description
|
|
10263
10373
|
}) {
|
|
10264
|
-
return /* @__PURE__ */ jsx83("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx83(
|
|
10265
|
-
|
|
10374
|
+
return /* @__PURE__ */ jsx83("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx83(
|
|
10375
|
+
FormFieldWrapper,
|
|
10266
10376
|
{
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10377
|
+
form,
|
|
10378
|
+
name: id,
|
|
10379
|
+
label: name,
|
|
10380
|
+
isRequired,
|
|
10381
|
+
description,
|
|
10382
|
+
testId,
|
|
10383
|
+
children: (field) => /* @__PURE__ */ jsx83(
|
|
10384
|
+
PasswordInput,
|
|
10385
|
+
{
|
|
10386
|
+
...field,
|
|
10387
|
+
className: "w-full",
|
|
10388
|
+
disabled: disabled === true || form.formState.isSubmitting,
|
|
10389
|
+
placeholder: placeholder ? placeholder : "",
|
|
10390
|
+
onBlur,
|
|
10391
|
+
"data-testid": testId
|
|
10392
|
+
}
|
|
10393
|
+
)
|
|
10273
10394
|
}
|
|
10274
|
-
) })
|
|
10395
|
+
) });
|
|
10275
10396
|
}
|
|
10276
10397
|
__name(FormPassword, "FormPassword");
|
|
10277
10398
|
|
|
@@ -10282,13 +10403,15 @@ function FormPlaceAutocomplete({
|
|
|
10282
10403
|
form,
|
|
10283
10404
|
id,
|
|
10284
10405
|
name,
|
|
10406
|
+
description,
|
|
10285
10407
|
placeholder,
|
|
10286
10408
|
disabled,
|
|
10287
10409
|
testId,
|
|
10288
10410
|
isRequired = false,
|
|
10289
10411
|
onPlaceSelect,
|
|
10290
10412
|
className,
|
|
10291
|
-
includeTypes
|
|
10413
|
+
includeTypes,
|
|
10414
|
+
languageCode = "en"
|
|
10292
10415
|
}) {
|
|
10293
10416
|
const [inputValue, setInputValue] = useState26("");
|
|
10294
10417
|
const [suggestions, setSuggestions] = useState26([]);
|
|
@@ -10326,7 +10449,7 @@ function FormPlaceAutocomplete({
|
|
|
10326
10449
|
body: JSON.stringify({
|
|
10327
10450
|
input,
|
|
10328
10451
|
...includeTypes ? { includedPrimaryTypes: includeTypes } : {},
|
|
10329
|
-
languageCode
|
|
10452
|
+
languageCode
|
|
10330
10453
|
})
|
|
10331
10454
|
});
|
|
10332
10455
|
if (!response.ok) {
|
|
@@ -10450,7 +10573,7 @@ function FormPlaceAutocomplete({
|
|
|
10450
10573
|
};
|
|
10451
10574
|
}, []);
|
|
10452
10575
|
if (loadError) {
|
|
10453
|
-
return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => /* @__PURE__ */ jsx84(
|
|
10576
|
+
return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, description, isRequired, children: (field) => /* @__PURE__ */ jsx84(
|
|
10454
10577
|
Input,
|
|
10455
10578
|
{
|
|
10456
10579
|
...field,
|
|
@@ -10461,7 +10584,7 @@ function FormPlaceAutocomplete({
|
|
|
10461
10584
|
}
|
|
10462
10585
|
) }) });
|
|
10463
10586
|
}
|
|
10464
|
-
return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", ref: containerRef, children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => /* @__PURE__ */ jsxs51("div", { className: "relative", children: [
|
|
10587
|
+
return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", ref: containerRef, children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, description, isRequired, children: (field) => /* @__PURE__ */ jsxs51("div", { className: "relative", children: [
|
|
10465
10588
|
/* @__PURE__ */ jsx84(
|
|
10466
10589
|
Input,
|
|
10467
10590
|
{
|
|
@@ -10503,6 +10626,7 @@ function FormSelect({
|
|
|
10503
10626
|
form,
|
|
10504
10627
|
id,
|
|
10505
10628
|
name,
|
|
10629
|
+
description,
|
|
10506
10630
|
placeholder,
|
|
10507
10631
|
disabled,
|
|
10508
10632
|
values,
|
|
@@ -10518,6 +10642,7 @@ function FormSelect({
|
|
|
10518
10642
|
form,
|
|
10519
10643
|
name: id,
|
|
10520
10644
|
label: name,
|
|
10645
|
+
description,
|
|
10521
10646
|
isRequired,
|
|
10522
10647
|
orientation: useRows ? "horizontal" : "vertical",
|
|
10523
10648
|
testId,
|
|
@@ -10554,10 +10679,11 @@ function FormSlider({
|
|
|
10554
10679
|
id,
|
|
10555
10680
|
name,
|
|
10556
10681
|
disabled,
|
|
10557
|
-
showPercentage
|
|
10682
|
+
showPercentage,
|
|
10683
|
+
description
|
|
10558
10684
|
}) {
|
|
10559
10685
|
const value = useWatch2({ control: form.control, name: id });
|
|
10560
|
-
return /* @__PURE__ */ jsx86("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx86(FormFieldWrapper, { form, name: id, label: name, children: () => /* @__PURE__ */ jsxs53("div", { children: [
|
|
10686
|
+
return /* @__PURE__ */ jsx86("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx86(FormFieldWrapper, { form, name: id, label: name, description, children: () => /* @__PURE__ */ jsxs53("div", { children: [
|
|
10561
10687
|
showPercentage && /* @__PURE__ */ jsx86("div", { className: "text-muted-foreground mb-2 flex w-full justify-center text-xs", children: `${value}%` }),
|
|
10562
10688
|
/* @__PURE__ */ jsx86(
|
|
10563
10689
|
Slider,
|
|
@@ -10603,18 +10729,33 @@ function FormTextarea({
|
|
|
10603
10729
|
name,
|
|
10604
10730
|
className,
|
|
10605
10731
|
placeholder,
|
|
10606
|
-
testId
|
|
10732
|
+
testId,
|
|
10733
|
+
description,
|
|
10734
|
+
isRequired,
|
|
10735
|
+
textareaRef
|
|
10607
10736
|
}) {
|
|
10608
|
-
return /* @__PURE__ */ jsx88("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx88(
|
|
10609
|
-
|
|
10737
|
+
return /* @__PURE__ */ jsx88("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx88(
|
|
10738
|
+
FormFieldWrapper,
|
|
10610
10739
|
{
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10740
|
+
form,
|
|
10741
|
+
name: id,
|
|
10742
|
+
label: name,
|
|
10743
|
+
description,
|
|
10744
|
+
isRequired,
|
|
10745
|
+
testId,
|
|
10746
|
+
children: (field) => /* @__PURE__ */ jsx88(
|
|
10747
|
+
Textarea,
|
|
10748
|
+
{
|
|
10749
|
+
...field,
|
|
10750
|
+
ref: textareaRef,
|
|
10751
|
+
className: cn("min-h-96 w-full", className),
|
|
10752
|
+
disabled: form.formState.isSubmitting,
|
|
10753
|
+
placeholder,
|
|
10754
|
+
"data-testid": testId
|
|
10755
|
+
}
|
|
10756
|
+
)
|
|
10616
10757
|
}
|
|
10617
|
-
) })
|
|
10758
|
+
) });
|
|
10618
10759
|
}
|
|
10619
10760
|
__name(FormTextarea, "FormTextarea");
|
|
10620
10761
|
|
|
@@ -10754,7 +10895,7 @@ __name(UserAvatarList, "UserAvatarList");
|
|
|
10754
10895
|
|
|
10755
10896
|
// src/features/user/components/widgets/UserSearchPopover.tsx
|
|
10756
10897
|
import { RefreshCwIcon, SearchIcon as SearchIcon3, XIcon as XIcon7 } from "lucide-react";
|
|
10757
|
-
import { useTranslations as
|
|
10898
|
+
import { useTranslations as useTranslations19 } from "next-intl";
|
|
10758
10899
|
import { useEffect as useEffect26, useState as useState29 } from "react";
|
|
10759
10900
|
|
|
10760
10901
|
// src/features/user/hooks/useUserSearch.ts
|
|
@@ -10803,13 +10944,13 @@ var useUserSearch = /* @__PURE__ */ __name(() => {
|
|
|
10803
10944
|
}, "useUserSearch");
|
|
10804
10945
|
|
|
10805
10946
|
// src/features/user/hooks/useUserTableStructure.tsx
|
|
10806
|
-
import { useTranslations as
|
|
10807
|
-
import { useMemo as
|
|
10947
|
+
import { useTranslations as useTranslations18 } from "next-intl";
|
|
10948
|
+
import { useMemo as useMemo15 } from "react";
|
|
10808
10949
|
import { Fragment as Fragment11, jsx as jsx94, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
10809
10950
|
var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
10810
|
-
const t =
|
|
10951
|
+
const t = useTranslations18();
|
|
10811
10952
|
const generateUrl = usePageUrlGenerator();
|
|
10812
|
-
const tableData =
|
|
10953
|
+
const tableData = useMemo15(() => {
|
|
10813
10954
|
return params.data.map((user) => {
|
|
10814
10955
|
const entry = {
|
|
10815
10956
|
jsonApiData: user
|
|
@@ -10894,16 +11035,16 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
10894
11035
|
title: t(`common.date.create`)
|
|
10895
11036
|
})
|
|
10896
11037
|
};
|
|
10897
|
-
const columns =
|
|
11038
|
+
const columns = useMemo15(() => {
|
|
10898
11039
|
return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
|
|
10899
11040
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
10900
|
-
return
|
|
11041
|
+
return useMemo15(() => ({ data: tableData, columns }), [tableData, columns]);
|
|
10901
11042
|
}, "useUserTableStructure");
|
|
10902
11043
|
|
|
10903
11044
|
// src/features/user/components/widgets/UserSearchPopover.tsx
|
|
10904
11045
|
import { jsx as jsx95, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
10905
11046
|
var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "start", className }) => {
|
|
10906
|
-
const t =
|
|
11047
|
+
const t = useTranslations19();
|
|
10907
11048
|
const [isOpen, setIsOpen] = useState29(false);
|
|
10908
11049
|
const { users, searchQuery, setSearchQuery, isLoading, loadUsers, clearSearch } = useUserSearch();
|
|
10909
11050
|
useEffect26(() => {
|
|
@@ -10962,7 +11103,7 @@ var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "s
|
|
|
10962
11103
|
// src/features/user/components/forms/UserSelector.tsx
|
|
10963
11104
|
import { Fragment as Fragment12, jsx as jsx96, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
10964
11105
|
function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
|
|
10965
|
-
const t =
|
|
11106
|
+
const t = useTranslations20();
|
|
10966
11107
|
const [open, setOpen] = useState30(false);
|
|
10967
11108
|
const searchTermRef = useRef18("");
|
|
10968
11109
|
const [searchTerm, setSearchTerm] = useState30("");
|
|
@@ -11069,7 +11210,7 @@ var UserContext = createContext8(void 0);
|
|
|
11069
11210
|
var UserProvider = /* @__PURE__ */ __name(({ children, dehydratedUser }) => {
|
|
11070
11211
|
const generateUrl = usePageUrlGenerator();
|
|
11071
11212
|
const { hasPermissionToModule } = useCurrentUserContext();
|
|
11072
|
-
const t =
|
|
11213
|
+
const t = useTranslations21();
|
|
11073
11214
|
const [user, setUser] = useState31(
|
|
11074
11215
|
dehydratedUser ? rehydrate(Modules.User, dehydratedUser) : void 0
|
|
11075
11216
|
);
|
|
@@ -11127,11 +11268,11 @@ var useUserContext = /* @__PURE__ */ __name(() => {
|
|
|
11127
11268
|
}, "useUserContext");
|
|
11128
11269
|
|
|
11129
11270
|
// src/features/user/components/containers/AllUsersListContainer.tsx
|
|
11130
|
-
import { useTranslations as
|
|
11271
|
+
import { useTranslations as useTranslations22 } from "next-intl";
|
|
11131
11272
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
11132
11273
|
function AllUsersListContainerInternal() {
|
|
11133
11274
|
const { hasPermissionToModule } = useCurrentUserContext();
|
|
11134
|
-
const t =
|
|
11275
|
+
const t = useTranslations22();
|
|
11135
11276
|
if (!hasPermissionToModule({ module: Modules.User, action: "delete" /* Delete */ })) return /* @__PURE__ */ jsx98(CompanyUsersList, {});
|
|
11136
11277
|
const tabs = [
|
|
11137
11278
|
{
|
|
@@ -11156,7 +11297,7 @@ function AllUsersListContainer() {
|
|
|
11156
11297
|
__name(AllUsersListContainer, "AllUsersListContainer");
|
|
11157
11298
|
|
|
11158
11299
|
// src/features/user/components/details/UserContent.tsx
|
|
11159
|
-
import { useTranslations as
|
|
11300
|
+
import { useTranslations as useTranslations23 } from "next-intl";
|
|
11160
11301
|
|
|
11161
11302
|
// src/components/contents/AttributeElement.tsx
|
|
11162
11303
|
import { jsx as jsx99, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
@@ -11172,7 +11313,7 @@ __name(AttributeElement, "AttributeElement");
|
|
|
11172
11313
|
import { BriefcaseIcon, MailIcon as MailIcon2, PhoneIcon } from "lucide-react";
|
|
11173
11314
|
import { Fragment as Fragment13, jsx as jsx100, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
11174
11315
|
function UserContent({ user }) {
|
|
11175
|
-
const t =
|
|
11316
|
+
const t = useTranslations23();
|
|
11176
11317
|
const generateUrl = usePageUrlGenerator();
|
|
11177
11318
|
const { setUser } = useUserContext();
|
|
11178
11319
|
const hasBio = !!user.bio;
|
|
@@ -11233,12 +11374,12 @@ function UserIndexDetails() {
|
|
|
11233
11374
|
__name(UserIndexDetails, "UserIndexDetails");
|
|
11234
11375
|
|
|
11235
11376
|
// src/features/user/components/details/UserStandaloneDetails.tsx
|
|
11236
|
-
import { useTranslations as
|
|
11377
|
+
import { useTranslations as useTranslations24 } from "next-intl";
|
|
11237
11378
|
import Image4 from "next/image";
|
|
11238
11379
|
import { Fragment as Fragment14, jsx as jsx102, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
11239
11380
|
function UserStanadaloneDetails({ user }) {
|
|
11240
11381
|
const generateUrl = usePageUrlGenerator();
|
|
11241
|
-
const t =
|
|
11382
|
+
const t = useTranslations24();
|
|
11242
11383
|
const { title } = useSharedContext();
|
|
11243
11384
|
let roles = /* @__PURE__ */ jsx102(Fragment14, {});
|
|
11244
11385
|
if (user.roles && user.roles.length > 0) {
|
|
@@ -11305,10 +11446,10 @@ function UsersListContainer({ fullWidth }) {
|
|
|
11305
11446
|
__name(UsersListContainer, "UsersListContainer");
|
|
11306
11447
|
|
|
11307
11448
|
// src/features/user/components/lists/AdminUsersList.tsx
|
|
11308
|
-
import { useTranslations as
|
|
11449
|
+
import { useTranslations as useTranslations25 } from "next-intl";
|
|
11309
11450
|
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
11310
11451
|
function AdminUsersListInternal({ company }) {
|
|
11311
|
-
const t =
|
|
11452
|
+
const t = useTranslations25();
|
|
11312
11453
|
const data = useDataListRetriever({
|
|
11313
11454
|
retriever: /* @__PURE__ */ __name((params) => UserService.findManyForAmin(params), "retriever"),
|
|
11314
11455
|
retrieverParams: { companyId: company.id },
|
|
@@ -11334,12 +11475,12 @@ function AdminUsersList() {
|
|
|
11334
11475
|
__name(AdminUsersList, "AdminUsersList");
|
|
11335
11476
|
|
|
11336
11477
|
// src/features/user/components/lists/CompanyUsersList.tsx
|
|
11337
|
-
import { useTranslations as
|
|
11478
|
+
import { useTranslations as useTranslations26 } from "next-intl";
|
|
11338
11479
|
import { useEffect as useEffect28 } from "react";
|
|
11339
11480
|
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
11340
11481
|
function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
11341
11482
|
const { company } = useCurrentUserContext();
|
|
11342
|
-
const t =
|
|
11483
|
+
const t = useTranslations26();
|
|
11343
11484
|
const data = useDataListRetriever({
|
|
11344
11485
|
ready: !!company,
|
|
11345
11486
|
retriever: /* @__PURE__ */ __name((params) => UserService.findAllUsers(params), "retriever"),
|
|
@@ -11394,10 +11535,10 @@ function ContributorsList({ content }) {
|
|
|
11394
11535
|
__name(ContributorsList, "ContributorsList");
|
|
11395
11536
|
|
|
11396
11537
|
// src/features/user/components/lists/RelevantUsersList.tsx
|
|
11397
|
-
import { useTranslations as
|
|
11538
|
+
import { useTranslations as useTranslations27 } from "next-intl";
|
|
11398
11539
|
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
11399
11540
|
function RelevantUsersList({ id }) {
|
|
11400
|
-
const t =
|
|
11541
|
+
const t = useTranslations27();
|
|
11401
11542
|
const data = useDataListRetriever({
|
|
11402
11543
|
module: Modules.User,
|
|
11403
11544
|
retriever: /* @__PURE__ */ __name((params) => UserService.findRelevant(params), "retriever"),
|
|
@@ -11416,10 +11557,10 @@ function RelevantUsersList({ id }) {
|
|
|
11416
11557
|
__name(RelevantUsersList, "RelevantUsersList");
|
|
11417
11558
|
|
|
11418
11559
|
// src/features/user/components/lists/RoleUsersList.tsx
|
|
11419
|
-
import { useTranslations as
|
|
11560
|
+
import { useTranslations as useTranslations28 } from "next-intl";
|
|
11420
11561
|
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
11421
11562
|
function RoleUsersList({ role }) {
|
|
11422
|
-
const t =
|
|
11563
|
+
const t = useTranslations28();
|
|
11423
11564
|
const data = useDataListRetriever({
|
|
11424
11565
|
retriever: /* @__PURE__ */ __name((params) => UserService.findAllUsersByRole(params), "retriever"),
|
|
11425
11566
|
retrieverParams: { roleId: role.id },
|
|
@@ -11438,13 +11579,13 @@ function RoleUsersList({ role }) {
|
|
|
11438
11579
|
__name(RoleUsersList, "RoleUsersList");
|
|
11439
11580
|
|
|
11440
11581
|
// src/features/user/components/lists/UserListInAdd.tsx
|
|
11441
|
-
import
|
|
11582
|
+
import React20 from "react";
|
|
11442
11583
|
import { Fragment as Fragment15, jsx as jsx111, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
11443
11584
|
function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
11444
11585
|
return /* @__PURE__ */ jsx111(Fragment15, { children: data.data !== void 0 && data.data.filter(
|
|
11445
11586
|
(user) => existingUsers && !existingUsers.find((existingUser) => existingUser.id === user.id)
|
|
11446
11587
|
).map((user) => {
|
|
11447
|
-
return /* @__PURE__ */ jsx111(
|
|
11588
|
+
return /* @__PURE__ */ jsx111(React20.Fragment, { children: /* @__PURE__ */ jsx111(
|
|
11448
11589
|
CommandItem,
|
|
11449
11590
|
{
|
|
11450
11591
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
@@ -11471,7 +11612,7 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
11471
11612
|
__name(UserListInAdd, "UserListInAdd");
|
|
11472
11613
|
|
|
11473
11614
|
// src/features/user/components/lists/UsersList.tsx
|
|
11474
|
-
import { useTranslations as
|
|
11615
|
+
import { useTranslations as useTranslations29 } from "next-intl";
|
|
11475
11616
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
11476
11617
|
function UsersList({
|
|
11477
11618
|
data,
|
|
@@ -11480,7 +11621,7 @@ function UsersList({
|
|
|
11480
11621
|
hideOptions: _hideOptions,
|
|
11481
11622
|
showRelevance: _showRelevance
|
|
11482
11623
|
}) {
|
|
11483
|
-
const t =
|
|
11624
|
+
const t = useTranslations29();
|
|
11484
11625
|
return /* @__PURE__ */ jsx112(
|
|
11485
11626
|
ContentListTable,
|
|
11486
11627
|
{
|
|
@@ -11494,10 +11635,10 @@ function UsersList({
|
|
|
11494
11635
|
__name(UsersList, "UsersList");
|
|
11495
11636
|
|
|
11496
11637
|
// src/features/user/components/lists/UsersListByContentIds.tsx
|
|
11497
|
-
import { useTranslations as
|
|
11638
|
+
import { useTranslations as useTranslations30 } from "next-intl";
|
|
11498
11639
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
11499
11640
|
function UsersListByContentIds({ contentIds }) {
|
|
11500
|
-
const t =
|
|
11641
|
+
const t = useTranslations30();
|
|
11501
11642
|
const data = useDataListRetriever({
|
|
11502
11643
|
module: Modules.User,
|
|
11503
11644
|
retriever: /* @__PURE__ */ __name((params) => UserService.findManyByContentIds(params), "retriever"),
|
|
@@ -11517,7 +11658,7 @@ __name(UsersListByContentIds, "UsersListByContentIds");
|
|
|
11517
11658
|
|
|
11518
11659
|
// src/features/company/components/details/CompanyContent.tsx
|
|
11519
11660
|
import { MapPinIcon } from "lucide-react";
|
|
11520
|
-
import { useTranslations as
|
|
11661
|
+
import { useTranslations as useTranslations32 } from "next-intl";
|
|
11521
11662
|
import Image5 from "next/image";
|
|
11522
11663
|
|
|
11523
11664
|
// src/utils/fiscal-utils.ts
|
|
@@ -11531,10 +11672,10 @@ function parseFiscalData(fiscalDataJson) {
|
|
|
11531
11672
|
__name(parseFiscalData, "parseFiscalData");
|
|
11532
11673
|
|
|
11533
11674
|
// src/components/fiscal/ItalianFiscalDataDisplay.tsx
|
|
11534
|
-
import { useTranslations as
|
|
11675
|
+
import { useTranslations as useTranslations31 } from "next-intl";
|
|
11535
11676
|
import { jsx as jsx114, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11536
11677
|
function ItalianFiscalDataDisplay({ data }) {
|
|
11537
|
-
const t =
|
|
11678
|
+
const t = useTranslations31();
|
|
11538
11679
|
return /* @__PURE__ */ jsxs68("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [
|
|
11539
11680
|
data.codice_fiscale && /* @__PURE__ */ jsx114(AttributeElement, { title: t("common.fields.codice_fiscale.label"), value: data.codice_fiscale }),
|
|
11540
11681
|
data.partita_iva && /* @__PURE__ */ jsx114(AttributeElement, { title: t("common.fields.partita_iva.label"), value: data.partita_iva }),
|
|
@@ -11570,7 +11711,7 @@ function hasAddressDetails(company) {
|
|
|
11570
11711
|
}
|
|
11571
11712
|
__name(hasAddressDetails, "hasAddressDetails");
|
|
11572
11713
|
function CompanyContent({ company, actions }) {
|
|
11573
|
-
const t =
|
|
11714
|
+
const t = useTranslations32();
|
|
11574
11715
|
if (!company) return null;
|
|
11575
11716
|
return /* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-y-8", children: [
|
|
11576
11717
|
/* @__PURE__ */ jsxs69("div", { className: "flex w-full items-center justify-between", children: [
|
|
@@ -11627,11 +11768,11 @@ __name(CompanyContent, "CompanyContent");
|
|
|
11627
11768
|
// src/features/company/components/details/TokenStatusIndicator.tsx
|
|
11628
11769
|
import { Battery, BatteryFull, BatteryLow, BatteryMedium, PlusCircle } from "lucide-react";
|
|
11629
11770
|
import Link2 from "next/link";
|
|
11630
|
-
import { useTranslations as
|
|
11771
|
+
import { useTranslations as useTranslations33 } from "next-intl";
|
|
11631
11772
|
import { jsx as jsx117, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
11632
11773
|
function TokenStatusIndicator({ className, size = "md", showExtraPages = true }) {
|
|
11633
11774
|
const { company } = useCurrentUserContext();
|
|
11634
|
-
const t =
|
|
11775
|
+
const t = useTranslations33();
|
|
11635
11776
|
if (!company) return null;
|
|
11636
11777
|
const monthlyTokens = company.monthlyTokens;
|
|
11637
11778
|
const availableMonthlyTokens = company.availableMonthlyTokens;
|
|
@@ -11776,7 +11917,7 @@ __name(CompanyContainer, "CompanyContainer");
|
|
|
11776
11917
|
// src/features/company/components/forms/CompanyConfigurationEditor.tsx
|
|
11777
11918
|
import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
|
11778
11919
|
import { Settings2Icon } from "lucide-react";
|
|
11779
|
-
import { useTranslations as
|
|
11920
|
+
import { useTranslations as useTranslations34 } from "next-intl";
|
|
11780
11921
|
import { useForm as useForm2 } from "react-hook-form";
|
|
11781
11922
|
import { jsx as jsx121, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11782
11923
|
function CompanyConfigurationEditorInternal({
|
|
@@ -11786,7 +11927,7 @@ function CompanyConfigurationEditorInternal({
|
|
|
11786
11927
|
buildPayload,
|
|
11787
11928
|
children
|
|
11788
11929
|
}) {
|
|
11789
|
-
const t =
|
|
11930
|
+
const t = useTranslations34();
|
|
11790
11931
|
const { setUser } = useCurrentUserContext();
|
|
11791
11932
|
const form = useForm2({
|
|
11792
11933
|
resolver: zodResolver2(formSchema),
|
|
@@ -11837,11 +11978,11 @@ __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
|
|
|
11837
11978
|
|
|
11838
11979
|
// src/features/company/components/forms/CompanyDeleter.tsx
|
|
11839
11980
|
import { LoaderCircleIcon as LoaderCircleIcon2, Trash2Icon as Trash2Icon2 } from "lucide-react";
|
|
11840
|
-
import { useTranslations as
|
|
11981
|
+
import { useTranslations as useTranslations35 } from "next-intl";
|
|
11841
11982
|
import { useState as useState32 } from "react";
|
|
11842
11983
|
import { Fragment as Fragment17, jsx as jsx122, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
11843
11984
|
function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 }) {
|
|
11844
|
-
const t =
|
|
11985
|
+
const t = useTranslations35();
|
|
11845
11986
|
const generateUrl = usePageUrlGenerator();
|
|
11846
11987
|
const [open, setOpen] = useState32(false);
|
|
11847
11988
|
const [finalWarningOpen, setFinalWarningOpen] = useState32(false);
|
|
@@ -11977,9 +12118,9 @@ __name(CompanyDeleter, "CompanyDeleter");
|
|
|
11977
12118
|
// src/features/company/components/forms/CompanyEditor.tsx
|
|
11978
12119
|
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
|
11979
12120
|
import { UploadIcon as UploadIcon3 } from "lucide-react";
|
|
11980
|
-
import { useTranslations as
|
|
12121
|
+
import { useTranslations as useTranslations36 } from "next-intl";
|
|
11981
12122
|
import Image6 from "next/image";
|
|
11982
|
-
import { useCallback as useCallback19, useEffect as useEffect29, useMemo as
|
|
12123
|
+
import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo16, useRef as useRef19, useState as useState33 } from "react";
|
|
11983
12124
|
import { useForm as useForm3 } from "react-hook-form";
|
|
11984
12125
|
import { v4 as v42 } from "uuid";
|
|
11985
12126
|
import { z as z2 } from "zod";
|
|
@@ -12000,7 +12141,7 @@ function CompanyEditorInternal({
|
|
|
12000
12141
|
const [file, setFile] = useState33(null);
|
|
12001
12142
|
const [files, setFiles] = useState33(null);
|
|
12002
12143
|
const [contentType, setContentType] = useState33(null);
|
|
12003
|
-
const t =
|
|
12144
|
+
const t = useTranslations36();
|
|
12004
12145
|
const fiscalRef = useRef19(null);
|
|
12005
12146
|
const addressComponentsRef = useRef19({});
|
|
12006
12147
|
const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) && process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === "true";
|
|
@@ -12048,7 +12189,7 @@ function CompanyEditorInternal({
|
|
|
12048
12189
|
setContentType(null);
|
|
12049
12190
|
}
|
|
12050
12191
|
}, [file]);
|
|
12051
|
-
const formSchema =
|
|
12192
|
+
const formSchema = useMemo16(
|
|
12052
12193
|
() => z2.object({
|
|
12053
12194
|
id: z2.uuidv4(),
|
|
12054
12195
|
name: z2.string().min(1, {
|
|
@@ -12187,10 +12328,10 @@ function CompanyEditor(props) {
|
|
|
12187
12328
|
__name(CompanyEditor, "CompanyEditor");
|
|
12188
12329
|
|
|
12189
12330
|
// src/features/company/components/lists/CompaniesList.tsx
|
|
12190
|
-
import { useTranslations as
|
|
12331
|
+
import { useTranslations as useTranslations37 } from "next-intl";
|
|
12191
12332
|
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
12192
12333
|
function CompaniesList() {
|
|
12193
|
-
const t =
|
|
12334
|
+
const t = useTranslations37();
|
|
12194
12335
|
const data = useDataListRetriever({
|
|
12195
12336
|
retriever: /* @__PURE__ */ __name((params) => CompanyService.findMany(params), "retriever"),
|
|
12196
12337
|
retrieverParams: {},
|
|
@@ -12220,7 +12361,7 @@ var defaultContextValue2 = {
|
|
|
12220
12361
|
};
|
|
12221
12362
|
var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, configurationEditorSlot }) => {
|
|
12222
12363
|
const generateUrl = usePageUrlGenerator();
|
|
12223
|
-
const t =
|
|
12364
|
+
const t = useTranslations38();
|
|
12224
12365
|
const { hasPermissionToModule, hasRole } = useCurrentUserContext();
|
|
12225
12366
|
const [company, setCompany] = useState34(
|
|
12226
12367
|
dehydratedCompany ? rehydrate(Modules.Company, dehydratedCompany) : void 0
|
|
@@ -12266,11 +12407,11 @@ var useCompanyContext = /* @__PURE__ */ __name(() => {
|
|
|
12266
12407
|
}, "useCompanyContext");
|
|
12267
12408
|
|
|
12268
12409
|
// src/features/notification/contexts/NotificationContext.tsx
|
|
12269
|
-
import { useTranslations as
|
|
12410
|
+
import { useTranslations as useTranslations40 } from "next-intl";
|
|
12270
12411
|
import { createContext as createContext10, useCallback as useCallback20, useContext as useContext11, useEffect as useEffect31, useRef as useRef20, useState as useState36 } from "react";
|
|
12271
12412
|
|
|
12272
12413
|
// src/features/notification/components/notifications/Notification.tsx
|
|
12273
|
-
import { useTranslations as
|
|
12414
|
+
import { useTranslations as useTranslations39 } from "next-intl";
|
|
12274
12415
|
import { useEffect as useEffect30, useState as useState35 } from "react";
|
|
12275
12416
|
import { jsx as jsx126, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
12276
12417
|
var generateNotificationData = /* @__PURE__ */ __name((params) => {
|
|
@@ -12309,7 +12450,7 @@ __name(NotificationToast, "NotificationToast");
|
|
|
12309
12450
|
function NotificationMenuItem({ notification, closePopover }) {
|
|
12310
12451
|
const generateUrl = usePageUrlGenerator();
|
|
12311
12452
|
const [isRead, setIsRead] = useState35(false);
|
|
12312
|
-
const t =
|
|
12453
|
+
const t = useTranslations39();
|
|
12313
12454
|
useEffect30(() => {
|
|
12314
12455
|
setIsRead(notification.isRead);
|
|
12315
12456
|
}, []);
|
|
@@ -12335,7 +12476,7 @@ __name(NotificationMenuItem, "NotificationMenuItem");
|
|
|
12335
12476
|
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
12336
12477
|
var NotificationContext = createContext10(void 0);
|
|
12337
12478
|
var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
12338
|
-
const t =
|
|
12479
|
+
const t = useTranslations40();
|
|
12339
12480
|
const router = useI18nRouter();
|
|
12340
12481
|
const [notifications, setNotifications] = useState36([]);
|
|
12341
12482
|
const [isLoading, setIsLoading] = useState36(false);
|
|
@@ -12698,13 +12839,13 @@ function useOnboarding() {
|
|
|
12698
12839
|
__name(useOnboarding, "useOnboarding");
|
|
12699
12840
|
|
|
12700
12841
|
// src/features/role/contexts/RoleContext.tsx
|
|
12701
|
-
import { useTranslations as
|
|
12842
|
+
import { useTranslations as useTranslations41 } from "next-intl";
|
|
12702
12843
|
import { createContext as createContext12, useContext as useContext13, useState as useState38 } from "react";
|
|
12703
12844
|
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
12704
12845
|
var RoleContext = createContext12(void 0);
|
|
12705
12846
|
var RoleProvider = /* @__PURE__ */ __name(({ children, dehydratedRole }) => {
|
|
12706
12847
|
const generateUrl = usePageUrlGenerator();
|
|
12707
|
-
const t =
|
|
12848
|
+
const t = useTranslations41();
|
|
12708
12849
|
const [role, setRole] = useState38(
|
|
12709
12850
|
dehydratedRole ? rehydrate(Modules.Role, dehydratedRole) : void 0
|
|
12710
12851
|
);
|
|
@@ -12767,10 +12908,10 @@ var useSharedContext = /* @__PURE__ */ __name(() => {
|
|
|
12767
12908
|
}, "useSharedContext");
|
|
12768
12909
|
|
|
12769
12910
|
// src/features/how-to/components/forms/HowToDeleter.tsx
|
|
12770
|
-
import { useTranslations as
|
|
12911
|
+
import { useTranslations as useTranslations42 } from "next-intl";
|
|
12771
12912
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
12772
12913
|
function HowToDeleterInternal({ howTo }) {
|
|
12773
|
-
const t =
|
|
12914
|
+
const t = useTranslations42();
|
|
12774
12915
|
const generateUrl = usePageUrlGenerator();
|
|
12775
12916
|
if (!howTo) return null;
|
|
12776
12917
|
return /* @__PURE__ */ jsx132(
|
|
@@ -12791,14 +12932,14 @@ __name(HowToDeleter, "HowToDeleter");
|
|
|
12791
12932
|
// src/features/how-to/components/forms/HowToEditor.tsx
|
|
12792
12933
|
import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
12793
12934
|
import { PlusIcon, SearchIcon as SearchIcon5, XIcon as XIcon9 } from "lucide-react";
|
|
12794
|
-
import { useTranslations as
|
|
12795
|
-
import { useCallback as useCallback22, useEffect as useEffect33, useMemo as
|
|
12935
|
+
import { useTranslations as useTranslations44 } from "next-intl";
|
|
12936
|
+
import { useCallback as useCallback22, useEffect as useEffect33, useMemo as useMemo17, useRef as useRef22, useState as useState39 } from "react";
|
|
12796
12937
|
import { useForm as useForm4 } from "react-hook-form";
|
|
12797
12938
|
import { v4 as v43 } from "uuid";
|
|
12798
12939
|
import { z as z3 } from "zod";
|
|
12799
12940
|
|
|
12800
12941
|
// src/features/how-to/components/forms/HowToMultiSelector.tsx
|
|
12801
|
-
import { useTranslations as
|
|
12942
|
+
import { useTranslations as useTranslations43 } from "next-intl";
|
|
12802
12943
|
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
12803
12944
|
function HowToMultiSelector({
|
|
12804
12945
|
id,
|
|
@@ -12809,7 +12950,7 @@ function HowToMultiSelector({
|
|
|
12809
12950
|
onChange,
|
|
12810
12951
|
isRequired = false
|
|
12811
12952
|
}) {
|
|
12812
|
-
const t =
|
|
12953
|
+
const t = useTranslations43();
|
|
12813
12954
|
return /* @__PURE__ */ jsx133(
|
|
12814
12955
|
EntityMultiSelector,
|
|
12815
12956
|
{
|
|
@@ -12844,7 +12985,7 @@ function PageSelector({
|
|
|
12844
12985
|
const [open, setOpen] = useState39(false);
|
|
12845
12986
|
const [search, setSearch] = useState39("");
|
|
12846
12987
|
const selectedLabel = value ? allPageUrls.find((opt) => opt.id === value) : void 0;
|
|
12847
|
-
const filteredOptions =
|
|
12988
|
+
const filteredOptions = useMemo17(() => {
|
|
12848
12989
|
const available = allPageUrls.filter((opt) => opt.id === value || !selectedPages.includes(opt.id));
|
|
12849
12990
|
if (!search) return available;
|
|
12850
12991
|
const term = search.toLowerCase();
|
|
@@ -12910,8 +13051,8 @@ function HowToEditorInternal({
|
|
|
12910
13051
|
onDialogOpenChange
|
|
12911
13052
|
}) {
|
|
12912
13053
|
const router = useI18nRouter();
|
|
12913
|
-
const t =
|
|
12914
|
-
const formSchema =
|
|
13054
|
+
const t = useTranslations44();
|
|
13055
|
+
const formSchema = useMemo17(
|
|
12915
13056
|
() => z3.object({
|
|
12916
13057
|
id: z3.string().uuid(),
|
|
12917
13058
|
name: z3.string().min(1, { message: t(`howto.fields.name.error`) }),
|
|
@@ -12973,7 +13114,7 @@ function HowToEditorInternal({
|
|
|
12973
13114
|
},
|
|
12974
13115
|
[form]
|
|
12975
13116
|
);
|
|
12976
|
-
const allPageUrls =
|
|
13117
|
+
const allPageUrls = useMemo17(() => ModuleRegistry.getAllPageUrls(), []);
|
|
12977
13118
|
const pages = form.watch("pages");
|
|
12978
13119
|
const addPage = /* @__PURE__ */ __name(() => {
|
|
12979
13120
|
form.setValue("pages", [...pages, ""], { shouldDirty: true });
|
|
@@ -13154,13 +13295,13 @@ function HowToEditor(props) {
|
|
|
13154
13295
|
__name(HowToEditor, "HowToEditor");
|
|
13155
13296
|
|
|
13156
13297
|
// src/features/how-to/contexts/HowToContext.tsx
|
|
13157
|
-
import { useTranslations as
|
|
13298
|
+
import { useTranslations as useTranslations45 } from "next-intl";
|
|
13158
13299
|
import { createContext as createContext14, useContext as useContext15, useState as useState40 } from "react";
|
|
13159
13300
|
import { jsx as jsx135 } from "react/jsx-runtime";
|
|
13160
13301
|
var HowToContext = createContext14(void 0);
|
|
13161
13302
|
var HowToProvider = /* @__PURE__ */ __name(({ children, dehydratedHowTo }) => {
|
|
13162
13303
|
const generateUrl = usePageUrlGenerator();
|
|
13163
|
-
const t =
|
|
13304
|
+
const t = useTranslations45();
|
|
13164
13305
|
const [howTo, setHowTo] = useState40(
|
|
13165
13306
|
dehydratedHowTo ? rehydrate(Modules.HowTo, dehydratedHowTo) : void 0
|
|
13166
13307
|
);
|
|
@@ -13219,8 +13360,8 @@ var useHowToContext = /* @__PURE__ */ __name(() => {
|
|
|
13219
13360
|
|
|
13220
13361
|
// src/features/rbac/contexts/RbacContext.tsx
|
|
13221
13362
|
import { DownloadIcon, Loader2Icon as Loader2Icon3 } from "lucide-react";
|
|
13222
|
-
import { useTranslations as
|
|
13223
|
-
import { createContext as createContext15, useCallback as useCallback23, useContext as useContext16, useEffect as useEffect34, useMemo as
|
|
13363
|
+
import { useTranslations as useTranslations46 } from "next-intl";
|
|
13364
|
+
import { createContext as createContext15, useCallback as useCallback23, useContext as useContext16, useEffect as useEffect34, useMemo as useMemo18, useState as useState41 } from "react";
|
|
13224
13365
|
import { jsx as jsx136, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
13225
13366
|
var DEFAULT_OUTPUT_PATH = "apps/api/src/rbac/permissions.ts";
|
|
13226
13367
|
function upsertToken(tokens, action, scope) {
|
|
@@ -13242,7 +13383,7 @@ var RbacProvider = /* @__PURE__ */ __name(({
|
|
|
13242
13383
|
outputPath = DEFAULT_OUTPUT_PATH
|
|
13243
13384
|
}) => {
|
|
13244
13385
|
const generateUrl = usePageUrlGenerator();
|
|
13245
|
-
const t =
|
|
13386
|
+
const t = useTranslations46();
|
|
13246
13387
|
const [matrix, setMatrix] = useState41(null);
|
|
13247
13388
|
const [modulePaths, setModulePaths] = useState41({});
|
|
13248
13389
|
const [loading, setLoading] = useState41(true);
|
|
@@ -13329,7 +13470,7 @@ var RbacProvider = /* @__PURE__ */ __name(({
|
|
|
13329
13470
|
if (functions.length > 0) response.functions = functions;
|
|
13330
13471
|
return response;
|
|
13331
13472
|
}, "title");
|
|
13332
|
-
const contextValue =
|
|
13473
|
+
const contextValue = useMemo18(
|
|
13333
13474
|
() => ({
|
|
13334
13475
|
matrix,
|
|
13335
13476
|
modulePaths,
|
|
@@ -13354,8 +13495,8 @@ var useRbacContext = /* @__PURE__ */ __name(() => {
|
|
|
13354
13495
|
}, "useRbacContext");
|
|
13355
13496
|
|
|
13356
13497
|
// src/features/assistant/contexts/AssistantContext.tsx
|
|
13357
|
-
import { useTranslations as
|
|
13358
|
-
import { createContext as createContext16, useCallback as useCallback24, useContext as useContext17, useEffect as useEffect35, useMemo as
|
|
13498
|
+
import { useTranslations as useTranslations47 } from "next-intl";
|
|
13499
|
+
import { createContext as createContext16, useCallback as useCallback24, useContext as useContext17, useEffect as useEffect35, useMemo as useMemo19, useState as useState42 } from "react";
|
|
13359
13500
|
import { jsx as jsx137 } from "react/jsx-runtime";
|
|
13360
13501
|
var AssistantContext = createContext16(void 0);
|
|
13361
13502
|
function stripOptimistic(list) {
|
|
@@ -13378,7 +13519,7 @@ function withPatchedTitle(source, title) {
|
|
|
13378
13519
|
}
|
|
13379
13520
|
__name(withPatchedTitle, "withPatchedTitle");
|
|
13380
13521
|
function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages, manageUrl = true }) {
|
|
13381
|
-
const t =
|
|
13522
|
+
const t = useTranslations47();
|
|
13382
13523
|
const generateUrl = usePageUrlGenerator();
|
|
13383
13524
|
const [assistant, setAssistant] = useState42(
|
|
13384
13525
|
() => dehydratedAssistant ? rehydrate(Modules.Assistant, dehydratedAssistant) : void 0
|
|
@@ -13526,7 +13667,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13526
13667
|
cancelled = true;
|
|
13527
13668
|
};
|
|
13528
13669
|
}, []);
|
|
13529
|
-
const value =
|
|
13670
|
+
const value = useMemo19(
|
|
13530
13671
|
() => ({
|
|
13531
13672
|
assistant,
|
|
13532
13673
|
messages,
|
|
@@ -13583,13 +13724,13 @@ function useAssistantContext() {
|
|
|
13583
13724
|
__name(useAssistantContext, "useAssistantContext");
|
|
13584
13725
|
|
|
13585
13726
|
// src/contexts/CommonContext.tsx
|
|
13586
|
-
import { useTranslations as
|
|
13727
|
+
import { useTranslations as useTranslations48 } from "next-intl";
|
|
13587
13728
|
import { createContext as createContext17, useContext as useContext18 } from "react";
|
|
13588
13729
|
import { jsx as jsx138 } from "react/jsx-runtime";
|
|
13589
13730
|
var CommonContext = createContext17(void 0);
|
|
13590
13731
|
var CommonProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
13591
13732
|
const { company } = useCurrentUserContext();
|
|
13592
|
-
const t =
|
|
13733
|
+
const t = useTranslations48();
|
|
13593
13734
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
13594
13735
|
const response = [];
|
|
13595
13736
|
return response;
|
|
@@ -13645,7 +13786,7 @@ __name(useHeaderLeftContent, "useHeaderLeftContent");
|
|
|
13645
13786
|
|
|
13646
13787
|
// src/components/EditableAvatar.tsx
|
|
13647
13788
|
import { PencilIcon as PencilIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
|
|
13648
|
-
import { useTranslations as
|
|
13789
|
+
import { useTranslations as useTranslations49 } from "next-intl";
|
|
13649
13790
|
import { useCallback as useCallback25, useRef as useRef23, useState as useState43 } from "react";
|
|
13650
13791
|
import { jsx as jsx141, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
13651
13792
|
function EditableAvatar({
|
|
@@ -13659,7 +13800,7 @@ function EditableAvatar({
|
|
|
13659
13800
|
fallbackClassName
|
|
13660
13801
|
}) {
|
|
13661
13802
|
const { company } = useCurrentUserContext();
|
|
13662
|
-
const t =
|
|
13803
|
+
const t = useTranslations49();
|
|
13663
13804
|
const fileInputRef = useRef23(null);
|
|
13664
13805
|
const [optimisticImage, setOptimisticImage] = useState43(null);
|
|
13665
13806
|
const [isUploading, setIsUploading] = useState43(false);
|
|
@@ -13795,7 +13936,7 @@ function TableCellAvatar({ image, name, className }) {
|
|
|
13795
13936
|
__name(TableCellAvatar, "TableCellAvatar");
|
|
13796
13937
|
|
|
13797
13938
|
// src/components/navigations/Breadcrumb.tsx
|
|
13798
|
-
import { useTranslations as
|
|
13939
|
+
import { useTranslations as useTranslations50 } from "next-intl";
|
|
13799
13940
|
import { Fragment as Fragment20, useState as useState44 } from "react";
|
|
13800
13941
|
import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
|
|
13801
13942
|
import { Fragment as Fragment21, jsx as jsx143, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
@@ -13810,19 +13951,19 @@ function BreadcrumbDesktop({
|
|
|
13810
13951
|
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: /* @__PURE__ */ jsx143(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }),
|
|
13811
13952
|
items.length > 0 && /* @__PURE__ */ jsx143(BreadcrumbSeparator, {}),
|
|
13812
13953
|
items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs82(Fragment21, { children: [
|
|
13813
|
-
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx143(Link, { href: items[0].href, children: items[0].name }) : /* @__PURE__ */ jsx143(Fragment21, { children: items[0].name }) }),
|
|
13954
|
+
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx143(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx143(Fragment21, { children: items[0].name }) }),
|
|
13814
13955
|
/* @__PURE__ */ jsx143(BreadcrumbSeparator, {}),
|
|
13815
13956
|
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: /* @__PURE__ */ jsxs82(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
13816
13957
|
/* @__PURE__ */ jsx143(DropdownMenuTrigger, { className: "flex items-center gap-1", "aria-label": "Toggle menu", children: /* @__PURE__ */ jsx143(BreadcrumbEllipsis, { className: "h-4 w-4" }) }),
|
|
13817
|
-
/* @__PURE__ */ jsx143(DropdownMenuContent, { align: "start", children: items.slice(1, -ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsx143(DropdownMenuItem, { children: /* @__PURE__ */ jsx143(Link, { href: item.href ? item.href : "#", children: item.name }) }, index)) })
|
|
13958
|
+
/* @__PURE__ */ jsx143(DropdownMenuContent, { align: "start", children: items.slice(1, -ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsx143(DropdownMenuItem, { children: /* @__PURE__ */ jsx143(Link, { href: item.href ? item.href : "#", onClick: item.onClick, children: item.name }) }, index)) })
|
|
13818
13959
|
] }) }),
|
|
13819
13960
|
/* @__PURE__ */ jsx143(BreadcrumbSeparator, {}),
|
|
13820
13961
|
items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs82(Fragment20, { children: [
|
|
13821
|
-
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx143(Link, { href: item.href, children: item.name }) : /* @__PURE__ */ jsx143(Fragment21, { children: item.name }) }),
|
|
13962
|
+
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx143(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx143(Fragment21, { children: item.name }) }),
|
|
13822
13963
|
index < items.slice(-ITEMS_TO_DISPLAY + 2).length - 1 && /* @__PURE__ */ jsx143(BreadcrumbSeparator, {})
|
|
13823
13964
|
] }, index))
|
|
13824
13965
|
] }) : /* @__PURE__ */ jsx143(Fragment21, { children: items.map((item, index) => /* @__PURE__ */ jsxs82(Fragment20, { children: [
|
|
13825
|
-
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx143(Link, { href: item.href, children: item.name }) : /* @__PURE__ */ jsx143(Fragment21, { children: item.name }) }),
|
|
13966
|
+
/* @__PURE__ */ jsx143(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx143(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx143(Fragment21, { children: item.name }) }),
|
|
13826
13967
|
index < items.length - 1 && /* @__PURE__ */ jsx143(BreadcrumbSeparator, {})
|
|
13827
13968
|
] }, index)) })
|
|
13828
13969
|
] }) });
|
|
@@ -13844,13 +13985,13 @@ function BreadcrumbMobile({
|
|
|
13844
13985
|
lastItem?.name,
|
|
13845
13986
|
/* @__PURE__ */ jsx143(ChevronDownIcon8, { className: "text-muted-foreground size-3.5" })
|
|
13846
13987
|
] }),
|
|
13847
|
-
/* @__PURE__ */ jsx143(DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ jsx143(DropdownMenuItem, { children: item.href ? /* @__PURE__ */ jsx143(Link, { href: item.href, children: item.name }) : /* @__PURE__ */ jsx143(Fragment21, { children: item.name }) }, index)) })
|
|
13988
|
+
/* @__PURE__ */ jsx143(DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ jsx143(DropdownMenuItem, { children: item.href ? /* @__PURE__ */ jsx143(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx143(Fragment21, { children: item.name }) }, index)) })
|
|
13848
13989
|
] });
|
|
13849
13990
|
}
|
|
13850
13991
|
__name(BreadcrumbMobile, "BreadcrumbMobile");
|
|
13851
13992
|
function BreadcrumbNavigation({ items }) {
|
|
13852
13993
|
const generateUrl = usePageUrlGenerator();
|
|
13853
|
-
const t =
|
|
13994
|
+
const t = useTranslations50();
|
|
13854
13995
|
const isMobile = useIsMobile();
|
|
13855
13996
|
if (isMobile) {
|
|
13856
13997
|
return /* @__PURE__ */ jsx143(BreadcrumbMobile, { items, generateUrl, t });
|
|
@@ -13970,11 +14111,11 @@ __name(PageSection, "PageSection");
|
|
|
13970
14111
|
// src/components/navigations/RecentPagesNavigator.tsx
|
|
13971
14112
|
import { useAtomValue } from "jotai";
|
|
13972
14113
|
import { HistoryIcon } from "lucide-react";
|
|
13973
|
-
import { useTranslations as
|
|
14114
|
+
import { useTranslations as useTranslations51 } from "next-intl";
|
|
13974
14115
|
import { jsx as jsx148, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
13975
14116
|
function RecentPagesNavigator() {
|
|
13976
14117
|
const recentPages = useAtomValue(recentPagesAtom);
|
|
13977
|
-
const t =
|
|
14118
|
+
const t = useTranslations51();
|
|
13978
14119
|
const { state } = useSidebar();
|
|
13979
14120
|
if (recentPages.length === 0) {
|
|
13980
14121
|
return null;
|
|
@@ -14007,7 +14148,7 @@ __name(PageContainer, "PageContainer");
|
|
|
14007
14148
|
|
|
14008
14149
|
// src/components/containers/ReactMarkdownContainer.tsx
|
|
14009
14150
|
import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
14010
|
-
import { useTranslations as
|
|
14151
|
+
import { useTranslations as useTranslations52 } from "next-intl";
|
|
14011
14152
|
import { useEffect as useEffect38, useRef as useRef24, useState as useState47 } from "react";
|
|
14012
14153
|
import ReactMarkdown from "react-markdown";
|
|
14013
14154
|
import remarkGfm from "remark-gfm";
|
|
@@ -14018,7 +14159,7 @@ function ReactMarkdownContainer({
|
|
|
14018
14159
|
initialLines = 4,
|
|
14019
14160
|
size = "normal"
|
|
14020
14161
|
}) {
|
|
14021
|
-
const t =
|
|
14162
|
+
const t = useTranslations52("ui.buttons");
|
|
14022
14163
|
const [isExpanded, setIsExpanded] = useState47(false);
|
|
14023
14164
|
const [showExpandButton, setShowExpandButton] = useState47(false);
|
|
14024
14165
|
const contentRef = useRef24(null);
|
|
@@ -14336,10 +14477,10 @@ function TabsContainer({
|
|
|
14336
14477
|
__name(TabsContainer, "TabsContainer");
|
|
14337
14478
|
|
|
14338
14479
|
// src/components/details/AllowedUsersDetails.tsx
|
|
14339
|
-
import { useTranslations as
|
|
14480
|
+
import { useTranslations as useTranslations53 } from "next-intl";
|
|
14340
14481
|
import { jsx as jsx154, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
14341
14482
|
function AllowedUsersDetails({ showTitle, content }) {
|
|
14342
|
-
const t =
|
|
14483
|
+
const t = useTranslations53();
|
|
14343
14484
|
return /* @__PURE__ */ jsxs92("div", { className: "mb-2 flex w-full flex-col gap-y-2", children: [
|
|
14344
14485
|
showTitle && /* @__PURE__ */ jsx154("h3", { className: "text-xs font-semibold", children: t("common.permissions") }),
|
|
14345
14486
|
/* @__PURE__ */ jsx154("div", { className: "flex w-full items-center justify-start gap-x-4", children: /* @__PURE__ */ jsx154(ContributorsList, { content }) })
|
|
@@ -14425,7 +14566,7 @@ __name(BlockNoteEditorMentionHoverCard, "BlockNoteEditorMentionHoverCard");
|
|
|
14425
14566
|
// src/components/editors/BlockNoteEditorMentionInlineContent.tsx
|
|
14426
14567
|
import { createReactInlineContentSpec } from "@blocknote/react";
|
|
14427
14568
|
import Link3 from "next/link";
|
|
14428
|
-
import
|
|
14569
|
+
import React24 from "react";
|
|
14429
14570
|
import { jsx as jsx156, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
14430
14571
|
var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
|
|
14431
14572
|
"data-mention-id": p.id,
|
|
@@ -14447,7 +14588,7 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
14447
14588
|
displayName
|
|
14448
14589
|
] });
|
|
14449
14590
|
}, "MentionExternalHTML");
|
|
14450
|
-
const Mention =
|
|
14591
|
+
const Mention = React24.memo(/* @__PURE__ */ __name(function Mention2(props) {
|
|
14451
14592
|
const displayName = nameResolver?.(props.id, props.entityType, props.alias) ?? props.alias;
|
|
14452
14593
|
if (disableMention) {
|
|
14453
14594
|
const resolved2 = resolveFn?.(props.id, props.entityType, displayName);
|
|
@@ -14512,10 +14653,10 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
14512
14653
|
// src/components/editors/BlockNoteEditorSuggestionMenuController.tsx
|
|
14513
14654
|
import { SuggestionMenuController } from "@blocknote/react";
|
|
14514
14655
|
import { autoUpdate, flip, shift } from "@floating-ui/react";
|
|
14515
|
-
import
|
|
14656
|
+
import React25, { useCallback as useCallback28, useMemo as useMemo20 } from "react";
|
|
14516
14657
|
import { jsx as jsx157 } from "react/jsx-runtime";
|
|
14517
|
-
var MentionInsertContext =
|
|
14518
|
-
var useMentionInsert = /* @__PURE__ */ __name(() =>
|
|
14658
|
+
var MentionInsertContext = React25.createContext(null);
|
|
14659
|
+
var useMentionInsert = /* @__PURE__ */ __name(() => React25.useContext(MentionInsertContext), "useMentionInsert");
|
|
14519
14660
|
var KEEP_OPEN_SENTINEL_TITLE = "__blocknote_mention_keep_open__";
|
|
14520
14661
|
function BlockNoteEditorMentionSuggestionMenu({
|
|
14521
14662
|
editor,
|
|
@@ -14564,7 +14705,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
14564
14705
|
},
|
|
14565
14706
|
[editor, mentionSearchFn, mentionSearchParams]
|
|
14566
14707
|
);
|
|
14567
|
-
const wrappedSuggestionMenuComponent =
|
|
14708
|
+
const wrappedSuggestionMenuComponent = useMemo20(() => {
|
|
14568
14709
|
if (!suggestionMenuComponent) return void 0;
|
|
14569
14710
|
const Component2 = suggestionMenuComponent;
|
|
14570
14711
|
const Wrapped = /* @__PURE__ */ __name((props) => {
|
|
@@ -14605,10 +14746,10 @@ __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMe
|
|
|
14605
14746
|
|
|
14606
14747
|
// src/components/viewers/BlockNoteViewerContainer.tsx
|
|
14607
14748
|
import dynamic2 from "next/dynamic";
|
|
14608
|
-
import
|
|
14749
|
+
import React26 from "react";
|
|
14609
14750
|
import { jsx as jsx158 } from "react/jsx-runtime";
|
|
14610
14751
|
var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-OPSCTHKJ.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
|
|
14611
|
-
var BlockNoteViewerContainer =
|
|
14752
|
+
var BlockNoteViewerContainer = React26.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
|
|
14612
14753
|
return /* @__PURE__ */ jsx158(BlockNoteViewer, { ...props });
|
|
14613
14754
|
}, "ViewerContainer"));
|
|
14614
14755
|
|
|
@@ -14811,7 +14952,7 @@ var cellUrl = /* @__PURE__ */ __name((params) => {
|
|
|
14811
14952
|
}, "cellUrl");
|
|
14812
14953
|
|
|
14813
14954
|
// src/client/context/JsonApiProvider.tsx
|
|
14814
|
-
import { useEffect as useEffect43, useMemo as
|
|
14955
|
+
import { useEffect as useEffect43, useMemo as useMemo21 } from "react";
|
|
14815
14956
|
import { jsx as jsx166 } from "react/jsx-runtime";
|
|
14816
14957
|
function JsonApiProvider({ config, children }) {
|
|
14817
14958
|
useEffect43(() => {
|
|
@@ -14819,7 +14960,7 @@ function JsonApiProvider({ config, children }) {
|
|
|
14819
14960
|
config.bootstrapper();
|
|
14820
14961
|
}
|
|
14821
14962
|
}, [config.bootstrapper]);
|
|
14822
|
-
const memoizedConfig =
|
|
14963
|
+
const memoizedConfig = useMemo21(() => config, [config]);
|
|
14823
14964
|
return /* @__PURE__ */ jsx166(JsonApiContext.Provider, { value: memoizedConfig, children });
|
|
14824
14965
|
}
|
|
14825
14966
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
@@ -15025,16 +15166,16 @@ function useJsonApiMutation(config) {
|
|
|
15025
15166
|
__name(useJsonApiMutation, "useJsonApiMutation");
|
|
15026
15167
|
|
|
15027
15168
|
// src/client/hooks/useRehydration.ts
|
|
15028
|
-
import { useMemo as
|
|
15169
|
+
import { useMemo as useMemo22 } from "react";
|
|
15029
15170
|
function useRehydration(classKey, data) {
|
|
15030
|
-
return
|
|
15171
|
+
return useMemo22(() => {
|
|
15031
15172
|
if (!data) return null;
|
|
15032
15173
|
return RehydrationFactory.rehydrate(classKey, data);
|
|
15033
15174
|
}, [classKey, data]);
|
|
15034
15175
|
}
|
|
15035
15176
|
__name(useRehydration, "useRehydration");
|
|
15036
15177
|
function useRehydrationList(classKey, data) {
|
|
15037
|
-
return
|
|
15178
|
+
return useMemo22(() => {
|
|
15038
15179
|
if (!data || data.length === 0) return [];
|
|
15039
15180
|
return RehydrationFactory.rehydrateList(classKey, data);
|
|
15040
15181
|
}, [classKey, data]);
|
|
@@ -15042,14 +15183,14 @@ function useRehydrationList(classKey, data) {
|
|
|
15042
15183
|
__name(useRehydrationList, "useRehydrationList");
|
|
15043
15184
|
|
|
15044
15185
|
// src/features/company/hooks/useCompanyTableStructure.tsx
|
|
15045
|
-
import { useTranslations as
|
|
15046
|
-
import { useMemo as
|
|
15186
|
+
import { useTranslations as useTranslations54 } from "next-intl";
|
|
15187
|
+
import { useMemo as useMemo23 } from "react";
|
|
15047
15188
|
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
15048
15189
|
var useCompanyTableStructure = /* @__PURE__ */ __name((params) => {
|
|
15049
|
-
const t =
|
|
15190
|
+
const t = useTranslations54();
|
|
15050
15191
|
const generateUrl = usePageUrlGenerator();
|
|
15051
15192
|
const { hasRole } = useCurrentUserContext();
|
|
15052
|
-
const tableData =
|
|
15193
|
+
const tableData = useMemo23(() => {
|
|
15053
15194
|
return params.data.map((company) => {
|
|
15054
15195
|
const entry = {
|
|
15055
15196
|
jsonApiData: company
|
|
@@ -15093,14 +15234,14 @@ var useCompanyTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
15093
15234
|
title: t(`common.date.create`)
|
|
15094
15235
|
})
|
|
15095
15236
|
};
|
|
15096
|
-
const columns =
|
|
15237
|
+
const columns = useMemo23(() => {
|
|
15097
15238
|
return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
|
|
15098
15239
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
15099
|
-
return
|
|
15240
|
+
return useMemo23(() => ({ data: tableData, columns }), [tableData, columns]);
|
|
15100
15241
|
}, "useCompanyTableStructure");
|
|
15101
15242
|
|
|
15102
15243
|
// src/features/company/hooks/useSubscriptionStatus.ts
|
|
15103
|
-
import { useMemo as
|
|
15244
|
+
import { useMemo as useMemo24 } from "react";
|
|
15104
15245
|
var TRIAL_DAYS = 14;
|
|
15105
15246
|
var GRACE_DAYS = 3;
|
|
15106
15247
|
var isAdministrator = /* @__PURE__ */ __name((currentUser) => {
|
|
@@ -15110,7 +15251,7 @@ var isAdministrator = /* @__PURE__ */ __name((currentUser) => {
|
|
|
15110
15251
|
}, "isAdministrator");
|
|
15111
15252
|
function useSubscriptionStatus() {
|
|
15112
15253
|
const { company, currentUser } = useCurrentUserContext();
|
|
15113
|
-
return
|
|
15254
|
+
return useMemo24(() => {
|
|
15114
15255
|
if (currentUser === null) {
|
|
15115
15256
|
return {
|
|
15116
15257
|
status: "loading",
|
|
@@ -15174,13 +15315,13 @@ function useSubscriptionStatus() {
|
|
|
15174
15315
|
__name(useSubscriptionStatus, "useSubscriptionStatus");
|
|
15175
15316
|
|
|
15176
15317
|
// src/features/role/hooks/useRoleTableStructure.tsx
|
|
15177
|
-
import { useTranslations as
|
|
15178
|
-
import { useMemo as
|
|
15318
|
+
import { useTranslations as useTranslations55 } from "next-intl";
|
|
15319
|
+
import { useMemo as useMemo25 } from "react";
|
|
15179
15320
|
import { Fragment as Fragment24, jsx as jsx168 } from "react/jsx-runtime";
|
|
15180
15321
|
var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
|
|
15181
|
-
const t =
|
|
15322
|
+
const t = useTranslations55();
|
|
15182
15323
|
const generateUrl = usePageUrlGenerator();
|
|
15183
|
-
const tableData =
|
|
15324
|
+
const tableData = useMemo25(() => {
|
|
15184
15325
|
return params.data.map((role) => {
|
|
15185
15326
|
const entry = {
|
|
15186
15327
|
jsonApiData: role
|
|
@@ -15222,20 +15363,20 @@ var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
15222
15363
|
title: t(`common.date.create`)
|
|
15223
15364
|
})
|
|
15224
15365
|
};
|
|
15225
|
-
const columns =
|
|
15366
|
+
const columns = useMemo25(() => {
|
|
15226
15367
|
return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
|
|
15227
15368
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
15228
|
-
return
|
|
15369
|
+
return useMemo25(() => ({ data: tableData, columns }), [tableData, columns]);
|
|
15229
15370
|
}, "useRoleTableStructure");
|
|
15230
15371
|
|
|
15231
15372
|
// src/features/content/hooks/useContentTableStructure.tsx
|
|
15232
|
-
import { useTranslations as
|
|
15233
|
-
import { useMemo as
|
|
15373
|
+
import { useTranslations as useTranslations56 } from "next-intl";
|
|
15374
|
+
import { useMemo as useMemo26 } from "react";
|
|
15234
15375
|
import { Fragment as Fragment25, jsx as jsx169, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
15235
15376
|
var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
15236
|
-
const t =
|
|
15377
|
+
const t = useTranslations56();
|
|
15237
15378
|
const generateUrl = usePageUrlGenerator();
|
|
15238
|
-
const tableData =
|
|
15379
|
+
const tableData = useMemo26(() => {
|
|
15239
15380
|
return params.data.map((content) => {
|
|
15240
15381
|
const entry = {
|
|
15241
15382
|
jsonApiData: content
|
|
@@ -15320,7 +15461,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
15320
15461
|
title: t(`common.date.update`)
|
|
15321
15462
|
})
|
|
15322
15463
|
};
|
|
15323
|
-
const columns =
|
|
15464
|
+
const columns = useMemo26(() => {
|
|
15324
15465
|
return params.fields.map((field) => {
|
|
15325
15466
|
const localHandler = fieldColumnMap[field];
|
|
15326
15467
|
if (localHandler) return localHandler();
|
|
@@ -15329,7 +15470,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
15329
15470
|
return void 0;
|
|
15330
15471
|
}).filter((col) => col !== void 0);
|
|
15331
15472
|
}, [params.fields, fieldColumnMap, t, generateUrl, params.context?.customCells]);
|
|
15332
|
-
return
|
|
15473
|
+
return useMemo26(() => ({ data: tableData, columns }), [tableData, columns]);
|
|
15333
15474
|
}, "useContentTableStructure");
|
|
15334
15475
|
|
|
15335
15476
|
// src/features/oauth/hooks/useOAuthClients.ts
|
|
@@ -15628,15 +15769,15 @@ registerTableGenerator("companies", useCompanyTableStructure);
|
|
|
15628
15769
|
// src/components/tables/ContentListTable.tsx
|
|
15629
15770
|
import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
|
|
15630
15771
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
15631
|
-
import
|
|
15772
|
+
import React28, { memo, useMemo as useMemo27, useState as useState57 } from "react";
|
|
15632
15773
|
|
|
15633
15774
|
// src/components/tables/ContentTableSearch.tsx
|
|
15634
15775
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
15635
|
-
import { useTranslations as
|
|
15776
|
+
import { useTranslations as useTranslations57 } from "next-intl";
|
|
15636
15777
|
import { useCallback as useCallback34, useEffect as useEffect48, useRef as useRef28, useState as useState56 } from "react";
|
|
15637
15778
|
import { jsx as jsx170, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
15638
15779
|
function ContentTableSearch({ data }) {
|
|
15639
|
-
const t =
|
|
15780
|
+
const t = useTranslations57();
|
|
15640
15781
|
const searchTermRef = useRef28("");
|
|
15641
15782
|
const inputRef = useRef28(null);
|
|
15642
15783
|
const [searchTerm, setSearchTerm] = useState56("");
|
|
@@ -15747,7 +15888,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
15747
15888
|
dataRetriever: data,
|
|
15748
15889
|
context: props.context
|
|
15749
15890
|
});
|
|
15750
|
-
const columnVisibility =
|
|
15891
|
+
const columnVisibility = useMemo27(
|
|
15751
15892
|
() => fields.reduce(
|
|
15752
15893
|
(acc, columnId) => {
|
|
15753
15894
|
acc[columnId] = true;
|
|
@@ -15772,7 +15913,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
15772
15913
|
}
|
|
15773
15914
|
});
|
|
15774
15915
|
const rowModel = tableData ? table.getRowModel() : null;
|
|
15775
|
-
const groupedRows =
|
|
15916
|
+
const groupedRows = useMemo27(() => {
|
|
15776
15917
|
if (!props.groupBy || !rowModel?.rows?.length) return null;
|
|
15777
15918
|
const groupMap = /* @__PURE__ */ new Map();
|
|
15778
15919
|
for (const row of rowModel.rows) {
|
|
@@ -15832,7 +15973,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
15832
15973
|
return /* @__PURE__ */ jsx171(TableHead, { className: meta?.className, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
|
|
15833
15974
|
}) }, headerGroup.id))
|
|
15834
15975
|
] }),
|
|
15835
|
-
/* @__PURE__ */ jsx171(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs98(
|
|
15976
|
+
/* @__PURE__ */ jsx171(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs98(React28.Fragment, { children: [
|
|
15836
15977
|
/* @__PURE__ */ jsx171(TableRow, { children: /* @__PURE__ */ jsx171(
|
|
15837
15978
|
TableCell,
|
|
15838
15979
|
{
|
|
@@ -15981,12 +16122,12 @@ function validateItalianTaxCode(value, type) {
|
|
|
15981
16122
|
__name(validateItalianTaxCode, "validateItalianTaxCode");
|
|
15982
16123
|
|
|
15983
16124
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
15984
|
-
import { useTranslations as
|
|
16125
|
+
import { useTranslations as useTranslations58 } from "next-intl";
|
|
15985
16126
|
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef30, useState as useState58 } from "react";
|
|
15986
16127
|
import { z as z4 } from "zod";
|
|
15987
16128
|
import { jsx as jsx173, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
15988
16129
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
15989
|
-
const t =
|
|
16130
|
+
const t = useTranslations58();
|
|
15990
16131
|
const initialRef = useRef30(initialData);
|
|
15991
16132
|
const [fiscalData, setFiscalData] = useState58(initialData);
|
|
15992
16133
|
const fiscalDataRef = useRef30(initialData);
|
|
@@ -16095,12 +16236,12 @@ var ItalianFiscalData_default = ItalianFiscalData;
|
|
|
16095
16236
|
import Image8 from "next/image";
|
|
16096
16237
|
|
|
16097
16238
|
// src/features/auth/contexts/AuthContext.tsx
|
|
16098
|
-
import { createContext as createContext20, useContext as useContext21, useMemo as
|
|
16239
|
+
import { createContext as createContext20, useContext as useContext21, useMemo as useMemo28, useState as useState60 } from "react";
|
|
16099
16240
|
|
|
16100
16241
|
// src/features/auth/components/forms/Register.tsx
|
|
16101
16242
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
16102
16243
|
import { Loader2 as Loader23 } from "lucide-react";
|
|
16103
|
-
import { useTranslations as
|
|
16244
|
+
import { useTranslations as useTranslations60 } from "next-intl";
|
|
16104
16245
|
import Image7 from "next/image";
|
|
16105
16246
|
import { useSearchParams as useSearchParams2 } from "next/navigation";
|
|
16106
16247
|
import { useEffect as useEffect50, useState as useState59 } from "react";
|
|
@@ -16109,14 +16250,14 @@ import { v4 as v45 } from "uuid";
|
|
|
16109
16250
|
import { z as z5 } from "zod";
|
|
16110
16251
|
|
|
16111
16252
|
// src/features/auth/components/GdprConsentSection.tsx
|
|
16112
|
-
import { useTranslations as
|
|
16253
|
+
import { useTranslations as useTranslations59 } from "next-intl";
|
|
16113
16254
|
import { Fragment as Fragment28, jsx as jsx174, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
16114
16255
|
function GdprConsentSection({
|
|
16115
16256
|
form,
|
|
16116
16257
|
termsCheckboxId = "termsAccepted",
|
|
16117
16258
|
marketingCheckboxId = "marketingConsent"
|
|
16118
16259
|
}) {
|
|
16119
|
-
const t =
|
|
16260
|
+
const t = useTranslations59("auth.gdpr");
|
|
16120
16261
|
const termsLabel = /* @__PURE__ */ jsxs101(Fragment28, { children: [
|
|
16121
16262
|
t("terms_prefix"),
|
|
16122
16263
|
" ",
|
|
@@ -16169,7 +16310,7 @@ function buildOAuthQueryParams(inviteCode, referralCode) {
|
|
|
16169
16310
|
}
|
|
16170
16311
|
__name(buildOAuthQueryParams, "buildOAuthQueryParams");
|
|
16171
16312
|
function Register() {
|
|
16172
|
-
const t =
|
|
16313
|
+
const t = useTranslations60();
|
|
16173
16314
|
const { setComponentType } = useAuthContext();
|
|
16174
16315
|
const searchParams = useSearchParams2();
|
|
16175
16316
|
const inviteCode = searchParams.get("invite");
|
|
@@ -16454,7 +16595,7 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
|
|
|
16454
16595
|
const [componentType, setComponentType] = useState60(initialComponentType);
|
|
16455
16596
|
const [params, setParams] = useState60(initialParams);
|
|
16456
16597
|
const [pendingTwoFactor, setPendingTwoFactor] = useState60();
|
|
16457
|
-
const activeComponent =
|
|
16598
|
+
const activeComponent = useMemo28(() => {
|
|
16458
16599
|
if (componentType === void 0) return null;
|
|
16459
16600
|
switch (componentType) {
|
|
16460
16601
|
case 0 /* Login */:
|
|
@@ -16514,17 +16655,17 @@ __name(InnerAuthContainer, "InnerAuthContainer");
|
|
|
16514
16655
|
|
|
16515
16656
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
16516
16657
|
import { ShieldAlert, ShieldCheck } from "lucide-react";
|
|
16517
|
-
import { useTranslations as
|
|
16658
|
+
import { useTranslations as useTranslations67 } from "next-intl";
|
|
16518
16659
|
import { useCallback as useCallback36, useEffect as useEffect52, useState as useState68 } from "react";
|
|
16519
16660
|
import { v4 as v48 } from "uuid";
|
|
16520
16661
|
|
|
16521
16662
|
// src/features/auth/components/two-factor/BackupCodesDialog.tsx
|
|
16522
16663
|
import { Copy, Download, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
16523
|
-
import { useTranslations as
|
|
16664
|
+
import { useTranslations as useTranslations61 } from "next-intl";
|
|
16524
16665
|
import { useState as useState61 } from "react";
|
|
16525
16666
|
import { jsx as jsx178, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
16526
16667
|
function BackupCodesDialog({ remainingCodes, onRegenerate, trigger }) {
|
|
16527
|
-
const t =
|
|
16668
|
+
const t = useTranslations61();
|
|
16528
16669
|
const [open, setOpen] = useState61(false);
|
|
16529
16670
|
const [codes, setCodes] = useState61([]);
|
|
16530
16671
|
const [isLoading, setIsLoading] = useState61(false);
|
|
@@ -16622,7 +16763,7 @@ Keep these codes safe. Each code can only be used once.`;
|
|
|
16622
16763
|
__name(BackupCodesDialog, "BackupCodesDialog");
|
|
16623
16764
|
|
|
16624
16765
|
// src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
|
|
16625
|
-
import { useTranslations as
|
|
16766
|
+
import { useTranslations as useTranslations62 } from "next-intl";
|
|
16626
16767
|
import { useState as useState63 } from "react";
|
|
16627
16768
|
|
|
16628
16769
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
@@ -16692,7 +16833,7 @@ __name(TotpInput, "TotpInput");
|
|
|
16692
16833
|
// src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
|
|
16693
16834
|
import { jsx as jsx180, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
16694
16835
|
function DisableTwoFactorDialog({ onSuccess, trigger }) {
|
|
16695
|
-
const t =
|
|
16836
|
+
const t = useTranslations62();
|
|
16696
16837
|
const [open, setOpen] = useState63(false);
|
|
16697
16838
|
const [isLoading, setIsLoading] = useState63(false);
|
|
16698
16839
|
const [error, setError] = useState63();
|
|
@@ -16735,11 +16876,11 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
|
|
|
16735
16876
|
|
|
16736
16877
|
// src/features/auth/components/two-factor/PasskeyList.tsx
|
|
16737
16878
|
import { Edit, Key, Trash2 } from "lucide-react";
|
|
16738
|
-
import { useTranslations as
|
|
16879
|
+
import { useTranslations as useTranslations63 } from "next-intl";
|
|
16739
16880
|
import { useState as useState64 } from "react";
|
|
16740
16881
|
import { Fragment as Fragment30, jsx as jsx181, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
16741
16882
|
function PasskeyList({ passkeys, onRefresh }) {
|
|
16742
|
-
const t =
|
|
16883
|
+
const t = useTranslations63();
|
|
16743
16884
|
const [renameDialogOpen, setRenameDialogOpen] = useState64(false);
|
|
16744
16885
|
const [selectedPasskey, setSelectedPasskey] = useState64(null);
|
|
16745
16886
|
const [newName, setNewName] = useState64("");
|
|
@@ -16856,12 +16997,12 @@ __name(PasskeyList, "PasskeyList");
|
|
|
16856
16997
|
|
|
16857
16998
|
// src/features/auth/components/two-factor/PasskeySetupDialog.tsx
|
|
16858
16999
|
import { startRegistration } from "@simplewebauthn/browser";
|
|
16859
|
-
import { useTranslations as
|
|
17000
|
+
import { useTranslations as useTranslations64 } from "next-intl";
|
|
16860
17001
|
import { useState as useState65 } from "react";
|
|
16861
17002
|
import { v4 as v46 } from "uuid";
|
|
16862
17003
|
import { jsx as jsx182, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
16863
17004
|
function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
16864
|
-
const t =
|
|
17005
|
+
const t = useTranslations64();
|
|
16865
17006
|
const { currentUser } = useCurrentUserContext();
|
|
16866
17007
|
const [name, setName] = useState65("");
|
|
16867
17008
|
const [isLoading, setIsLoading] = useState65(false);
|
|
@@ -16927,11 +17068,11 @@ __name(PasskeySetupDialog, "PasskeySetupDialog");
|
|
|
16927
17068
|
|
|
16928
17069
|
// src/features/auth/components/two-factor/TotpAuthenticatorList.tsx
|
|
16929
17070
|
import { Smartphone, Trash2 as Trash22 } from "lucide-react";
|
|
16930
|
-
import { useTranslations as
|
|
17071
|
+
import { useTranslations as useTranslations65 } from "next-intl";
|
|
16931
17072
|
import { useState as useState66 } from "react";
|
|
16932
17073
|
import { jsx as jsx183, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
16933
17074
|
function TotpAuthenticatorList({ authenticators, onDelete }) {
|
|
16934
|
-
const t =
|
|
17075
|
+
const t = useTranslations65();
|
|
16935
17076
|
const [deletingId, setDeletingId] = useState66(null);
|
|
16936
17077
|
const handleDelete = /* @__PURE__ */ __name(async (id) => {
|
|
16937
17078
|
setDeletingId(id);
|
|
@@ -17001,13 +17142,13 @@ function TotpAuthenticatorList({ authenticators, onDelete }) {
|
|
|
17001
17142
|
__name(TotpAuthenticatorList, "TotpAuthenticatorList");
|
|
17002
17143
|
|
|
17003
17144
|
// src/features/auth/components/two-factor/TotpSetupDialog.tsx
|
|
17004
|
-
import { useTranslations as
|
|
17145
|
+
import { useTranslations as useTranslations66 } from "next-intl";
|
|
17005
17146
|
import { QRCodeSVG } from "qrcode.react";
|
|
17006
17147
|
import { useState as useState67 } from "react";
|
|
17007
17148
|
import { v4 as v47 } from "uuid";
|
|
17008
17149
|
import { jsx as jsx184, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
17009
17150
|
function TotpSetupDialog({ onSuccess, trigger }) {
|
|
17010
|
-
const t =
|
|
17151
|
+
const t = useTranslations66();
|
|
17011
17152
|
const { currentUser } = useCurrentUserContext();
|
|
17012
17153
|
const [open, setOpen] = useState67(false);
|
|
17013
17154
|
const [step, setStep] = useState67("name");
|
|
@@ -17112,7 +17253,7 @@ __name(TotpSetupDialog, "TotpSetupDialog");
|
|
|
17112
17253
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
17113
17254
|
import { Fragment as Fragment31, jsx as jsx185, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
17114
17255
|
function TwoFactorSettings() {
|
|
17115
|
-
const t =
|
|
17256
|
+
const t = useTranslations67();
|
|
17116
17257
|
const [status, setStatus] = useState68(null);
|
|
17117
17258
|
const [authenticators, setAuthenticators] = useState68([]);
|
|
17118
17259
|
const [passkeys, setPasskeys] = useState68([]);
|
|
@@ -17230,7 +17371,7 @@ function SecurityContainer() {
|
|
|
17230
17371
|
__name(SecurityContainer, "SecurityContainer");
|
|
17231
17372
|
|
|
17232
17373
|
// src/features/auth/components/details/LandingComponent.tsx
|
|
17233
|
-
import { useTranslations as
|
|
17374
|
+
import { useTranslations as useTranslations68 } from "next-intl";
|
|
17234
17375
|
import Image9 from "next/image";
|
|
17235
17376
|
|
|
17236
17377
|
// src/features/auth/components/buttons/GoogleSignInButton.tsx
|
|
@@ -17291,7 +17432,7 @@ __name(GoogleSignInButton, "GoogleSignInButton");
|
|
|
17291
17432
|
// src/features/auth/components/details/LandingComponent.tsx
|
|
17292
17433
|
import { Fragment as Fragment32, jsx as jsx188, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
17293
17434
|
function LandingComponent() {
|
|
17294
|
-
const t =
|
|
17435
|
+
const t = useTranslations68();
|
|
17295
17436
|
const { setComponentType } = useAuthContext();
|
|
17296
17437
|
return /* @__PURE__ */ jsxs112(Fragment32, { children: [
|
|
17297
17438
|
/* @__PURE__ */ jsxs112(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
|
|
@@ -17323,7 +17464,7 @@ __name(LandingComponent, "LandingComponent");
|
|
|
17323
17464
|
|
|
17324
17465
|
// src/features/auth/components/forms/AcceptInvitation.tsx
|
|
17325
17466
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
17326
|
-
import { useTranslations as
|
|
17467
|
+
import { useTranslations as useTranslations69 } from "next-intl";
|
|
17327
17468
|
import Image10 from "next/image";
|
|
17328
17469
|
import { useEffect as useEffect53, useState as useState69 } from "react";
|
|
17329
17470
|
import { useForm as useForm6 } from "react-hook-form";
|
|
@@ -17333,7 +17474,7 @@ function AcceptInvitation() {
|
|
|
17333
17474
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
17334
17475
|
const [showConfirmation, setShowConfirmation] = useState69(false);
|
|
17335
17476
|
const [error, setError] = useState69(void 0);
|
|
17336
|
-
const t =
|
|
17477
|
+
const t = useTranslations69();
|
|
17337
17478
|
useEffect53(() => {
|
|
17338
17479
|
async function validateCode(code) {
|
|
17339
17480
|
try {
|
|
@@ -17425,7 +17566,7 @@ function AcceptInvitation() {
|
|
|
17425
17566
|
__name(AcceptInvitation, "AcceptInvitation");
|
|
17426
17567
|
|
|
17427
17568
|
// src/features/auth/components/forms/ActivateAccount.tsx
|
|
17428
|
-
import { useTranslations as
|
|
17569
|
+
import { useTranslations as useTranslations70 } from "next-intl";
|
|
17429
17570
|
import Image11 from "next/image";
|
|
17430
17571
|
import { useEffect as useEffect54, useState as useState70 } from "react";
|
|
17431
17572
|
import { Fragment as Fragment34, jsx as jsx190, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
@@ -17433,7 +17574,7 @@ function ActivateAccount() {
|
|
|
17433
17574
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
17434
17575
|
const [showConfirmation, setShowConfirmation] = useState70(false);
|
|
17435
17576
|
const [error, setError] = useState70(void 0);
|
|
17436
|
-
const t =
|
|
17577
|
+
const t = useTranslations70();
|
|
17437
17578
|
useEffect54(() => {
|
|
17438
17579
|
async function ActivateAccount2(code) {
|
|
17439
17580
|
try {
|
|
@@ -17501,14 +17642,14 @@ __name(Cookies, "Cookies");
|
|
|
17501
17642
|
|
|
17502
17643
|
// src/features/auth/components/forms/ForgotPassword.tsx
|
|
17503
17644
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
17504
|
-
import { useTranslations as
|
|
17645
|
+
import { useTranslations as useTranslations71 } from "next-intl";
|
|
17505
17646
|
import Image12 from "next/image";
|
|
17506
17647
|
import { useState as useState72 } from "react";
|
|
17507
17648
|
import { useForm as useForm7 } from "react-hook-form";
|
|
17508
17649
|
import { z as z7 } from "zod";
|
|
17509
17650
|
import { Fragment as Fragment35, jsx as jsx191, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
17510
17651
|
function ForgotPassword() {
|
|
17511
|
-
const t =
|
|
17652
|
+
const t = useTranslations71();
|
|
17512
17653
|
const { setComponentType } = useAuthContext();
|
|
17513
17654
|
const [showConfirmation, setShowConfirmation] = useState72(false);
|
|
17514
17655
|
const formSchema = z7.object({
|
|
@@ -17572,7 +17713,7 @@ __name(ForgotPassword, "ForgotPassword");
|
|
|
17572
17713
|
|
|
17573
17714
|
// src/features/auth/components/forms/Login.tsx
|
|
17574
17715
|
import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
17575
|
-
import { useTranslations as
|
|
17716
|
+
import { useTranslations as useTranslations72 } from "next-intl";
|
|
17576
17717
|
import Image13 from "next/image";
|
|
17577
17718
|
import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
|
|
17578
17719
|
import { useEffect as useEffect56, useState as useState73 } from "react";
|
|
@@ -17580,7 +17721,7 @@ import { useForm as useForm8 } from "react-hook-form";
|
|
|
17580
17721
|
import { z as z8 } from "zod";
|
|
17581
17722
|
import { Fragment as Fragment36, jsx as jsx192, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
17582
17723
|
function Login() {
|
|
17583
|
-
const t =
|
|
17724
|
+
const t = useTranslations72();
|
|
17584
17725
|
const { setUser } = useCurrentUserContext();
|
|
17585
17726
|
const { setComponentType, setPendingTwoFactor } = useAuthContext();
|
|
17586
17727
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -17769,7 +17910,7 @@ __name(RefreshUser, "RefreshUser");
|
|
|
17769
17910
|
|
|
17770
17911
|
// src/features/auth/components/forms/ResetPassword.tsx
|
|
17771
17912
|
import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
17772
|
-
import { useTranslations as
|
|
17913
|
+
import { useTranslations as useTranslations73 } from "next-intl";
|
|
17773
17914
|
import Image14 from "next/image";
|
|
17774
17915
|
import { useEffect as useEffect59, useState as useState74 } from "react";
|
|
17775
17916
|
import { useForm as useForm9 } from "react-hook-form";
|
|
@@ -17779,7 +17920,7 @@ function ResetPassword() {
|
|
|
17779
17920
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
17780
17921
|
const [showConfirmation, setShowConfirmation] = useState74(false);
|
|
17781
17922
|
const [error, setError] = useState74(void 0);
|
|
17782
|
-
const t =
|
|
17923
|
+
const t = useTranslations73();
|
|
17783
17924
|
useEffect59(() => {
|
|
17784
17925
|
async function validateResetPasswordCode(code) {
|
|
17785
17926
|
try {
|
|
@@ -17855,19 +17996,19 @@ function ResetPassword() {
|
|
|
17855
17996
|
__name(ResetPassword, "ResetPassword");
|
|
17856
17997
|
|
|
17857
17998
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
17858
|
-
import { useTranslations as
|
|
17999
|
+
import { useTranslations as useTranslations75 } from "next-intl";
|
|
17859
18000
|
import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
|
|
17860
18001
|
import { useState as useState76 } from "react";
|
|
17861
18002
|
import { v4 as v410 } from "uuid";
|
|
17862
18003
|
|
|
17863
18004
|
// src/features/auth/components/two-factor/PasskeyButton.tsx
|
|
17864
18005
|
import { startAuthentication } from "@simplewebauthn/browser";
|
|
17865
|
-
import { useTranslations as
|
|
18006
|
+
import { useTranslations as useTranslations74 } from "next-intl";
|
|
17866
18007
|
import { useState as useState75 } from "react";
|
|
17867
18008
|
import { v4 as v49 } from "uuid";
|
|
17868
18009
|
import { jsx as jsx195 } from "react/jsx-runtime";
|
|
17869
18010
|
function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
17870
|
-
const t =
|
|
18011
|
+
const t = useTranslations74();
|
|
17871
18012
|
const [isLoading, setIsLoading] = useState75(false);
|
|
17872
18013
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
17873
18014
|
setIsLoading(true);
|
|
@@ -17905,7 +18046,7 @@ __name(PasskeyButton, "PasskeyButton");
|
|
|
17905
18046
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
17906
18047
|
import { Fragment as Fragment39, jsx as jsx196, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
17907
18048
|
function TwoFactorChallenge() {
|
|
17908
|
-
const t =
|
|
18049
|
+
const t = useTranslations75();
|
|
17909
18050
|
const { setUser } = useCurrentUserContext();
|
|
17910
18051
|
const { pendingTwoFactor, setPendingTwoFactor } = useAuthContext();
|
|
17911
18052
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -18042,10 +18183,10 @@ function TwoFactorChallenge() {
|
|
|
18042
18183
|
__name(TwoFactorChallenge, "TwoFactorChallenge");
|
|
18043
18184
|
|
|
18044
18185
|
// src/features/content/components/lists/ContentsList.tsx
|
|
18045
|
-
import { useTranslations as
|
|
18186
|
+
import { useTranslations as useTranslations76 } from "next-intl";
|
|
18046
18187
|
import { jsx as jsx197, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
18047
18188
|
function ContentsList({ contentList }) {
|
|
18048
|
-
const t =
|
|
18189
|
+
const t = useTranslations76();
|
|
18049
18190
|
return /* @__PURE__ */ jsxs119("div", { className: "flex min-h-0 w-full flex-col overflow-y-auto", children: [
|
|
18050
18191
|
/* @__PURE__ */ jsx197("h2", { className: "text-xl font-semibold", children: t(`content.news`) }),
|
|
18051
18192
|
/* @__PURE__ */ jsx197("div", { className: "flex flex-col", children: contentList.map((content) => /* @__PURE__ */ jsx197(ContentsListElement, { content }, content.id)) })
|
|
@@ -18073,10 +18214,10 @@ function ContentsListElement({ content }) {
|
|
|
18073
18214
|
__name(ContentsListElement, "ContentsListElement");
|
|
18074
18215
|
|
|
18075
18216
|
// src/features/content/components/lists/ContentsListById.tsx
|
|
18076
|
-
import { useTranslations as
|
|
18217
|
+
import { useTranslations as useTranslations77 } from "next-intl";
|
|
18077
18218
|
import { jsx as jsx198 } from "react/jsx-runtime";
|
|
18078
18219
|
function ContentsListById({ contentIds }) {
|
|
18079
|
-
const t =
|
|
18220
|
+
const t = useTranslations77();
|
|
18080
18221
|
const data = useDataListRetriever({
|
|
18081
18222
|
module: Modules.Content,
|
|
18082
18223
|
retriever: /* @__PURE__ */ __name((params) => ContentService.findMany(params), "retriever"),
|
|
@@ -18095,10 +18236,10 @@ function ContentsListById({ contentIds }) {
|
|
|
18095
18236
|
__name(ContentsListById, "ContentsListById");
|
|
18096
18237
|
|
|
18097
18238
|
// src/features/content/components/lists/RelevantContentsList.tsx
|
|
18098
|
-
import { useTranslations as
|
|
18239
|
+
import { useTranslations as useTranslations78 } from "next-intl";
|
|
18099
18240
|
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
18100
18241
|
function RelevantContentsList({ id }) {
|
|
18101
|
-
const t =
|
|
18242
|
+
const t = useTranslations78();
|
|
18102
18243
|
const data = useDataListRetriever({
|
|
18103
18244
|
module: Modules.Content,
|
|
18104
18245
|
retriever: /* @__PURE__ */ __name((params) => ContentService.findRelevant(params), "retriever"),
|
|
@@ -18118,13 +18259,13 @@ __name(RelevantContentsList, "RelevantContentsList");
|
|
|
18118
18259
|
|
|
18119
18260
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
18120
18261
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
18121
|
-
import { useTranslations as
|
|
18122
|
-
import { useCallback as useCallback37, useEffect as useEffect60, useMemo as
|
|
18262
|
+
import { useTranslations as useTranslations80 } from "next-intl";
|
|
18263
|
+
import { useCallback as useCallback37, useEffect as useEffect60, useMemo as useMemo30, useRef as useRef32, useState as useState77 } from "react";
|
|
18123
18264
|
|
|
18124
18265
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
18125
18266
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
18126
|
-
import { useTranslations as
|
|
18127
|
-
import { useMemo as
|
|
18267
|
+
import { useTranslations as useTranslations79 } from "next-intl";
|
|
18268
|
+
import { useMemo as useMemo29 } from "react";
|
|
18128
18269
|
|
|
18129
18270
|
// src/features/how-to/utils/blocknote.ts
|
|
18130
18271
|
function extractTextFromContent(content) {
|
|
@@ -18195,9 +18336,9 @@ __name(extractHeadings, "extractHeadings");
|
|
|
18195
18336
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
18196
18337
|
import { jsx as jsx200, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
18197
18338
|
function HowToCommandViewer({ howTo, onBack, onStartChat }) {
|
|
18198
|
-
const t =
|
|
18199
|
-
const readingTime =
|
|
18200
|
-
const headings =
|
|
18339
|
+
const t = useTranslations79();
|
|
18340
|
+
const readingTime = useMemo29(() => calculateReadingTime(howTo.description), [howTo.description]);
|
|
18341
|
+
const headings = useMemo29(() => extractHeadings(howTo.description), [howTo.description]);
|
|
18201
18342
|
return /* @__PURE__ */ jsxs120("div", { className: "flex h-full flex-col", children: [
|
|
18202
18343
|
/* @__PURE__ */ jsxs120("div", { className: "flex items-center gap-3 border-b px-4 py-3", children: [
|
|
18203
18344
|
/* @__PURE__ */ jsxs120(Button, { variant: "ghost", size: "sm", onClick: onBack, className: "h-8 px-2", children: [
|
|
@@ -18244,7 +18385,7 @@ function matchPage(pathname, pattern) {
|
|
|
18244
18385
|
}
|
|
18245
18386
|
__name(matchPage, "matchPage");
|
|
18246
18387
|
function HowToCommand({ pathname, extraGroups, onStartChat }) {
|
|
18247
|
-
const t =
|
|
18388
|
+
const t = useTranslations80();
|
|
18248
18389
|
const [dialogOpen, setDialogOpen] = useState77(false);
|
|
18249
18390
|
const [selectedHowTo, setSelectedHowTo] = useState77(null);
|
|
18250
18391
|
const searchTermRef = useRef32("");
|
|
@@ -18256,7 +18397,7 @@ function HowToCommand({ pathname, extraGroups, onStartChat }) {
|
|
|
18256
18397
|
retrieverParams: {},
|
|
18257
18398
|
module: Modules.HowTo
|
|
18258
18399
|
});
|
|
18259
|
-
const { relevantHowTos, otherHowTos } =
|
|
18400
|
+
const { relevantHowTos, otherHowTos } = useMemo30(() => {
|
|
18260
18401
|
if (!data.data) return { relevantHowTos: [], otherHowTos: [] };
|
|
18261
18402
|
const relevant = [];
|
|
18262
18403
|
const other = [];
|
|
@@ -18410,10 +18551,10 @@ function HowToContent() {
|
|
|
18410
18551
|
__name(HowToContent, "HowToContent");
|
|
18411
18552
|
|
|
18412
18553
|
// src/features/how-to/components/details/HowToDetails.tsx
|
|
18413
|
-
import { useTranslations as
|
|
18554
|
+
import { useTranslations as useTranslations81 } from "next-intl";
|
|
18414
18555
|
import { jsx as jsx203, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
18415
18556
|
function HowToDetailsInternal({ howTo }) {
|
|
18416
|
-
const t =
|
|
18557
|
+
const t = useTranslations81();
|
|
18417
18558
|
const { title } = useSharedContext();
|
|
18418
18559
|
const pagesList = HowTo.parsePagesFromString(howTo.pages);
|
|
18419
18560
|
return /* @__PURE__ */ jsxs122("div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
@@ -18449,16 +18590,16 @@ function HowToContainer() {
|
|
|
18449
18590
|
__name(HowToContainer, "HowToContainer");
|
|
18450
18591
|
|
|
18451
18592
|
// src/features/how-to/components/lists/HowToList.tsx
|
|
18452
|
-
import { useTranslations as
|
|
18593
|
+
import { useTranslations as useTranslations83 } from "next-intl";
|
|
18453
18594
|
|
|
18454
18595
|
// src/features/how-to/hooks/useHowToTableStructure.tsx
|
|
18455
|
-
import { useTranslations as
|
|
18456
|
-
import { useMemo as
|
|
18596
|
+
import { useTranslations as useTranslations82 } from "next-intl";
|
|
18597
|
+
import { useMemo as useMemo31 } from "react";
|
|
18457
18598
|
import { Fragment as Fragment41, jsx as jsx205 } from "react/jsx-runtime";
|
|
18458
18599
|
var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
18459
|
-
const t =
|
|
18600
|
+
const t = useTranslations82();
|
|
18460
18601
|
const generateUrl = usePageUrlGenerator();
|
|
18461
|
-
const tableData =
|
|
18602
|
+
const tableData = useMemo31(() => {
|
|
18462
18603
|
return params.data.map((howTo) => {
|
|
18463
18604
|
const entry = {
|
|
18464
18605
|
jsonApiData: howTo
|
|
@@ -18512,17 +18653,17 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
18512
18653
|
title: t(`common.date.update`)
|
|
18513
18654
|
})
|
|
18514
18655
|
};
|
|
18515
|
-
const columns =
|
|
18656
|
+
const columns = useMemo31(() => {
|
|
18516
18657
|
return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
|
|
18517
18658
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
18518
|
-
return
|
|
18659
|
+
return useMemo31(() => ({ data: tableData, columns }), [tableData, columns]);
|
|
18519
18660
|
}, "useHowToTableStructure");
|
|
18520
18661
|
registerTableGenerator("howtos", useHowToTableStructure);
|
|
18521
18662
|
|
|
18522
18663
|
// src/features/how-to/components/lists/HowToList.tsx
|
|
18523
18664
|
import { jsx as jsx206 } from "react/jsx-runtime";
|
|
18524
18665
|
function HowToList({ fullWidth }) {
|
|
18525
|
-
const t =
|
|
18666
|
+
const t = useTranslations83();
|
|
18526
18667
|
const data = useDataListRetriever({
|
|
18527
18668
|
module: Modules.HowTo,
|
|
18528
18669
|
retriever: /* @__PURE__ */ __name((params) => HowToService.findMany(params), "retriever"),
|
|
@@ -18556,7 +18697,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
18556
18697
|
|
|
18557
18698
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
18558
18699
|
import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
|
|
18559
|
-
import { useTranslations as
|
|
18700
|
+
import { useTranslations as useTranslations84 } from "next-intl";
|
|
18560
18701
|
import { useCallback as useCallback38, useEffect as useEffect61, useRef as useRef33, useState as useState78 } from "react";
|
|
18561
18702
|
import { Fragment as Fragment42, jsx as jsx208, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
18562
18703
|
function HowToSelector({
|
|
@@ -18567,7 +18708,7 @@ function HowToSelector({
|
|
|
18567
18708
|
onChange,
|
|
18568
18709
|
isRequired = false
|
|
18569
18710
|
}) {
|
|
18570
|
-
const t =
|
|
18711
|
+
const t = useTranslations84();
|
|
18571
18712
|
const [open, setOpen] = useState78(false);
|
|
18572
18713
|
const searchTermRef = useRef33("");
|
|
18573
18714
|
const [searchTerm, setSearchTerm] = useState78("");
|
|
@@ -18660,7 +18801,7 @@ function HowToSelector({
|
|
|
18660
18801
|
__name(HowToSelector, "HowToSelector");
|
|
18661
18802
|
|
|
18662
18803
|
// src/features/assistant/components/parts/AssistantSidebar.tsx
|
|
18663
|
-
import { useTranslations as
|
|
18804
|
+
import { useTranslations as useTranslations85 } from "next-intl";
|
|
18664
18805
|
import { Plus } from "lucide-react";
|
|
18665
18806
|
|
|
18666
18807
|
// src/features/assistant/utils/groupThreadsByBucket.ts
|
|
@@ -18686,7 +18827,7 @@ __name(groupThreadsByBucket, "groupThreadsByBucket");
|
|
|
18686
18827
|
// src/features/assistant/components/parts/AssistantSidebar.tsx
|
|
18687
18828
|
import { Fragment as Fragment43, jsx as jsx209, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
18688
18829
|
function AssistantSidebar({ threads, activeId, onSelect, onNew }) {
|
|
18689
|
-
const t =
|
|
18830
|
+
const t = useTranslations85();
|
|
18690
18831
|
const groups = groupThreadsByBucket(threads);
|
|
18691
18832
|
const renderSection = /* @__PURE__ */ __name((label, items) => {
|
|
18692
18833
|
if (items.length === 0) return null;
|
|
@@ -18721,16 +18862,16 @@ __name(AssistantSidebar, "AssistantSidebar");
|
|
|
18721
18862
|
|
|
18722
18863
|
// src/features/assistant/components/parts/AssistantEmptyState.tsx
|
|
18723
18864
|
import { useState as useState80 } from "react";
|
|
18724
|
-
import { useTranslations as
|
|
18865
|
+
import { useTranslations as useTranslations87 } from "next-intl";
|
|
18725
18866
|
import { Sparkles } from "lucide-react";
|
|
18726
18867
|
|
|
18727
18868
|
// src/features/assistant/components/parts/AssistantComposer.tsx
|
|
18728
18869
|
import { useState as useState79 } from "react";
|
|
18729
|
-
import { useTranslations as
|
|
18870
|
+
import { useTranslations as useTranslations86 } from "next-intl";
|
|
18730
18871
|
import { ArrowUp } from "lucide-react";
|
|
18731
18872
|
import { jsx as jsx210, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
18732
18873
|
function AssistantComposer({ onSend, disabled, value: controlled, onValueChange }) {
|
|
18733
|
-
const t =
|
|
18874
|
+
const t = useTranslations86();
|
|
18734
18875
|
const [internal, setInternal] = useState79("");
|
|
18735
18876
|
const value = controlled ?? internal;
|
|
18736
18877
|
const setValue = onValueChange ?? setInternal;
|
|
@@ -18776,7 +18917,7 @@ __name(AssistantComposer, "AssistantComposer");
|
|
|
18776
18917
|
import { jsx as jsx211, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
18777
18918
|
var STARTER_KEYS = ["a", "b", "c", "d"];
|
|
18778
18919
|
function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChange }) {
|
|
18779
|
-
const t =
|
|
18920
|
+
const t = useTranslations87();
|
|
18780
18921
|
const [draft, setDraft] = useState80("");
|
|
18781
18922
|
return /* @__PURE__ */ jsx211("div", { className: "flex h-full w-full items-center justify-center p-10", children: /* @__PURE__ */ jsxs126("div", { className: "flex w-full max-w-2xl flex-col gap-6", children: [
|
|
18782
18923
|
/* @__PURE__ */ jsxs126("div", { className: "text-center", children: [
|
|
@@ -18816,10 +18957,10 @@ __name(AssistantEmptyState, "AssistantEmptyState");
|
|
|
18816
18957
|
|
|
18817
18958
|
// src/features/assistant/components/parts/AssistantThreadHeader.tsx
|
|
18818
18959
|
import { useState as useState81 } from "react";
|
|
18819
|
-
import { useTranslations as
|
|
18960
|
+
import { useTranslations as useTranslations88 } from "next-intl";
|
|
18820
18961
|
import { jsx as jsx212, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
18821
18962
|
function AssistantThreadHeader({ assistant, onRename, onDelete }) {
|
|
18822
|
-
const t =
|
|
18963
|
+
const t = useTranslations88();
|
|
18823
18964
|
const [renameValue, setRenameValue] = useState81(assistant.title);
|
|
18824
18965
|
const [renameOpen, setRenameOpen] = useState81(false);
|
|
18825
18966
|
const [deleteOpen, setDeleteOpen] = useState81(false);
|
|
@@ -18878,25 +19019,25 @@ __name(AssistantThreadHeader, "AssistantThreadHeader");
|
|
|
18878
19019
|
import { useEffect as useEffect63, useRef as useRef34 } from "react";
|
|
18879
19020
|
|
|
18880
19021
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
18881
|
-
import { useTranslations as
|
|
19022
|
+
import { useTranslations as useTranslations94 } from "next-intl";
|
|
18882
19023
|
import { Sparkles as Sparkles2, AlertCircle } from "lucide-react";
|
|
18883
19024
|
import ReactMarkdown3 from "react-markdown";
|
|
18884
19025
|
import remarkGfm3 from "remark-gfm";
|
|
18885
19026
|
|
|
18886
19027
|
// src/features/assistant-message/components/parts/MessageSourcesContainer.tsx
|
|
18887
|
-
import { useEffect as useEffect62, useMemo as
|
|
19028
|
+
import { useEffect as useEffect62, useMemo as useMemo33, useState as useState84 } from "react";
|
|
18888
19029
|
|
|
18889
19030
|
// src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
|
|
18890
|
-
import { useMemo as
|
|
18891
|
-
import { useTranslations as
|
|
19031
|
+
import { useMemo as useMemo32, useState as useState83 } from "react";
|
|
19032
|
+
import { useTranslations as useTranslations93 } from "next-intl";
|
|
18892
19033
|
import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
18893
19034
|
|
|
18894
19035
|
// src/features/assistant-message/components/parts/tabs/ReferencesTab.tsx
|
|
18895
|
-
import { useTranslations as
|
|
19036
|
+
import { useTranslations as useTranslations89 } from "next-intl";
|
|
18896
19037
|
import Link4 from "next/link";
|
|
18897
19038
|
import { jsx as jsx213, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
18898
19039
|
function ReferencesTab({ references }) {
|
|
18899
|
-
const t =
|
|
19040
|
+
const t = useTranslations89();
|
|
18900
19041
|
const generate = usePageUrlGenerator();
|
|
18901
19042
|
if (references.length === 0) return null;
|
|
18902
19043
|
return /* @__PURE__ */ jsxs128(Table, { children: [
|
|
@@ -18925,7 +19066,7 @@ __name(ReferencesTab, "ReferencesTab");
|
|
|
18925
19066
|
|
|
18926
19067
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
18927
19068
|
import { Fragment as Fragment44, useState as useState82 } from "react";
|
|
18928
|
-
import { useTranslations as
|
|
19069
|
+
import { useTranslations as useTranslations90 } from "next-intl";
|
|
18929
19070
|
import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
|
|
18930
19071
|
import ReactMarkdown2 from "react-markdown";
|
|
18931
19072
|
import remarkGfm2 from "remark-gfm";
|
|
@@ -18962,7 +19103,7 @@ __name(RelevanceMeter, "RelevanceMeter");
|
|
|
18962
19103
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
18963
19104
|
import { jsx as jsx215, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
18964
19105
|
function CitationsTab({ citations, sources }) {
|
|
18965
|
-
const t =
|
|
19106
|
+
const t = useTranslations90();
|
|
18966
19107
|
const [expanded, setExpanded] = useState82(/* @__PURE__ */ new Set());
|
|
18967
19108
|
if (citations.length === 0) return null;
|
|
18968
19109
|
const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
|
|
@@ -19020,11 +19161,11 @@ function CitationsTab({ citations, sources }) {
|
|
|
19020
19161
|
__name(CitationsTab, "CitationsTab");
|
|
19021
19162
|
|
|
19022
19163
|
// src/features/assistant-message/components/parts/tabs/ContentsTab.tsx
|
|
19023
|
-
import { useTranslations as
|
|
19164
|
+
import { useTranslations as useTranslations91 } from "next-intl";
|
|
19024
19165
|
import Link5 from "next/link";
|
|
19025
19166
|
import { jsx as jsx216, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
19026
19167
|
function ContentsTab({ citations, sources }) {
|
|
19027
|
-
const t =
|
|
19168
|
+
const t = useTranslations91();
|
|
19028
19169
|
const generate = usePageUrlGenerator();
|
|
19029
19170
|
const map = /* @__PURE__ */ new Map();
|
|
19030
19171
|
for (const c of citations) {
|
|
@@ -19076,7 +19217,7 @@ function ContentsTab({ citations, sources }) {
|
|
|
19076
19217
|
__name(ContentsTab, "ContentsTab");
|
|
19077
19218
|
|
|
19078
19219
|
// src/features/assistant-message/components/parts/tabs/UsersTab.tsx
|
|
19079
|
-
import { useTranslations as
|
|
19220
|
+
import { useTranslations as useTranslations92 } from "next-intl";
|
|
19080
19221
|
import Link6 from "next/link";
|
|
19081
19222
|
import { jsx as jsx217, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
19082
19223
|
function getInitials2(name) {
|
|
@@ -19093,7 +19234,7 @@ function readAuthor(source) {
|
|
|
19093
19234
|
}
|
|
19094
19235
|
__name(readAuthor, "readAuthor");
|
|
19095
19236
|
function UsersTab({ users, citations, sources }) {
|
|
19096
|
-
const t =
|
|
19237
|
+
const t = useTranslations92();
|
|
19097
19238
|
const generate = usePageUrlGenerator();
|
|
19098
19239
|
const userMap = /* @__PURE__ */ new Map();
|
|
19099
19240
|
for (const u of users) {
|
|
@@ -19179,8 +19320,8 @@ __name(SuggestedQuestionsTab, "SuggestedQuestionsTab");
|
|
|
19179
19320
|
// src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
|
|
19180
19321
|
import { jsx as jsx219, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
19181
19322
|
function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sources, users }) {
|
|
19182
|
-
const t =
|
|
19183
|
-
const visibleReferences =
|
|
19323
|
+
const t = useTranslations93();
|
|
19324
|
+
const visibleReferences = useMemo32(
|
|
19184
19325
|
() => message.references.filter((ref) => {
|
|
19185
19326
|
try {
|
|
19186
19327
|
return !!ModuleRegistry.findByName(ref.type).pageUrl;
|
|
@@ -19193,7 +19334,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
19193
19334
|
const refsCount = visibleReferences.length;
|
|
19194
19335
|
const citationsCount = message.citations.length;
|
|
19195
19336
|
const suggestionsCount = isLatestAssistant ? message.suggestedQuestions.length : 0;
|
|
19196
|
-
const contentsCount =
|
|
19337
|
+
const contentsCount = useMemo32(() => {
|
|
19197
19338
|
const ids = /* @__PURE__ */ new Set();
|
|
19198
19339
|
for (const c of message.citations) {
|
|
19199
19340
|
if (!c.nodeId) continue;
|
|
@@ -19272,7 +19413,7 @@ var SourcesFetcher = class extends ClientAbstractService {
|
|
|
19272
19413
|
}
|
|
19273
19414
|
};
|
|
19274
19415
|
function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp }) {
|
|
19275
|
-
const groups =
|
|
19416
|
+
const groups = useMemo33(() => {
|
|
19276
19417
|
const map = /* @__PURE__ */ new Map();
|
|
19277
19418
|
for (const chunk of message.citations) {
|
|
19278
19419
|
if (!chunk.nodeType || !chunk.nodeId) continue;
|
|
@@ -19285,7 +19426,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
19285
19426
|
}
|
|
19286
19427
|
return map;
|
|
19287
19428
|
}, [message.citations]);
|
|
19288
|
-
const groupsKey =
|
|
19429
|
+
const groupsKey = useMemo33(() => {
|
|
19289
19430
|
const parts = [];
|
|
19290
19431
|
for (const [nodeType, ids] of groups) {
|
|
19291
19432
|
parts.push(`${nodeType}:${Array.from(ids).sort().join(",")}`);
|
|
@@ -19327,12 +19468,12 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
19327
19468
|
cancelled = true;
|
|
19328
19469
|
};
|
|
19329
19470
|
}, [groupsKey, groups]);
|
|
19330
|
-
const sources =
|
|
19471
|
+
const sources = useMemo33(() => {
|
|
19331
19472
|
const map = /* @__PURE__ */ new Map();
|
|
19332
19473
|
for (const entity of resolved) map.set(entity.id, entity);
|
|
19333
19474
|
return map;
|
|
19334
19475
|
}, [resolved]);
|
|
19335
|
-
const users =
|
|
19476
|
+
const users = useMemo33(() => {
|
|
19336
19477
|
const userMap = /* @__PURE__ */ new Map();
|
|
19337
19478
|
for (const entity of resolved) {
|
|
19338
19479
|
const author = entity._author ?? (() => {
|
|
@@ -19369,7 +19510,7 @@ function MessageItem({
|
|
|
19369
19510
|
onRetry,
|
|
19370
19511
|
renderApprovalAction
|
|
19371
19512
|
}) {
|
|
19372
|
-
const t =
|
|
19513
|
+
const t = useTranslations94();
|
|
19373
19514
|
const isUser = message.role === "user";
|
|
19374
19515
|
const isFailed = isUser && !!failedMessageIds?.has(message.id);
|
|
19375
19516
|
if (isUser) {
|
|
@@ -19428,11 +19569,11 @@ function MessageList({ messages, onSelectFollowUp, failedMessageIds, onRetry, re
|
|
|
19428
19569
|
__name(MessageList, "MessageList");
|
|
19429
19570
|
|
|
19430
19571
|
// src/features/assistant/components/parts/AssistantStatusLine.tsx
|
|
19431
|
-
import { useTranslations as
|
|
19572
|
+
import { useTranslations as useTranslations95 } from "next-intl";
|
|
19432
19573
|
import { Loader2 as Loader24 } from "lucide-react";
|
|
19433
19574
|
import { jsx as jsx223, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
19434
19575
|
function AssistantStatusLine({ status }) {
|
|
19435
|
-
const t =
|
|
19576
|
+
const t = useTranslations95();
|
|
19436
19577
|
const text = status ?? t("features.assistant.thinking");
|
|
19437
19578
|
return /* @__PURE__ */ jsxs135("div", { className: "text-muted-foreground flex items-center gap-2 px-4 py-2 text-sm", children: [
|
|
19438
19579
|
/* @__PURE__ */ jsx223(Loader24, { className: "h-4 w-4 animate-spin" }),
|
|
@@ -19558,14 +19699,14 @@ var NotificationErrorBoundary = class extends Component {
|
|
|
19558
19699
|
};
|
|
19559
19700
|
|
|
19560
19701
|
// src/features/notification/components/containers/NotificationsListContainer.tsx
|
|
19561
|
-
import { useTranslations as
|
|
19702
|
+
import { useTranslations as useTranslations97 } from "next-intl";
|
|
19562
19703
|
|
|
19563
19704
|
// src/features/notification/components/lists/NotificationsList.tsx
|
|
19564
19705
|
import { ArchiveIcon } from "lucide-react";
|
|
19565
|
-
import { useTranslations as
|
|
19706
|
+
import { useTranslations as useTranslations96 } from "next-intl";
|
|
19566
19707
|
import { Fragment as Fragment46, jsx as jsx227, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
19567
19708
|
function NotificationsList({ archived }) {
|
|
19568
|
-
const t =
|
|
19709
|
+
const t = useTranslations96();
|
|
19569
19710
|
const generateUrl = usePageUrlGenerator();
|
|
19570
19711
|
const data = useDataListRetriever({
|
|
19571
19712
|
retriever: /* @__PURE__ */ __name((params) => NotificationService.findMany(params), "retriever"),
|
|
@@ -19623,7 +19764,7 @@ __name(NotificationsList, "NotificationsList");
|
|
|
19623
19764
|
// src/features/notification/components/containers/NotificationsListContainer.tsx
|
|
19624
19765
|
import { jsx as jsx228, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
19625
19766
|
function NotificationsListContainerContent() {
|
|
19626
|
-
const t =
|
|
19767
|
+
const t = useTranslations97();
|
|
19627
19768
|
const { notifications: _notifications, isLoading: _isLoading, error } = useNotificationContext();
|
|
19628
19769
|
if (error) {
|
|
19629
19770
|
return /* @__PURE__ */ jsx228("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs140("div", { className: "text-destructive text-sm", children: [
|
|
@@ -19654,8 +19795,8 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
19654
19795
|
|
|
19655
19796
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
19656
19797
|
import { BellIcon } from "lucide-react";
|
|
19657
|
-
import { useTranslations as
|
|
19658
|
-
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect64, useMemo as
|
|
19798
|
+
import { useTranslations as useTranslations98 } from "next-intl";
|
|
19799
|
+
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect64, useMemo as useMemo34, useRef as useRef35, useState as useState85 } from "react";
|
|
19659
19800
|
import { jsx as jsx229, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
19660
19801
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
19661
19802
|
const _instanceId = useRef35(Math.random().toString(36).substr(2, 9));
|
|
@@ -19675,7 +19816,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
19675
19816
|
removeSocketNotification: _removeSocketNotification,
|
|
19676
19817
|
clearSocketNotifications
|
|
19677
19818
|
} = useSocketContext();
|
|
19678
|
-
const t =
|
|
19819
|
+
const t = useTranslations98();
|
|
19679
19820
|
const generateUrl = usePageUrlGenerator();
|
|
19680
19821
|
const [newNotifications, setNewNotifications] = useState85(false);
|
|
19681
19822
|
const preventAutoClose = useRef35(false);
|
|
@@ -19699,7 +19840,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
19699
19840
|
}
|
|
19700
19841
|
return !breaker.isOpen;
|
|
19701
19842
|
}, []);
|
|
19702
|
-
const { unreadCount, unreadIds } =
|
|
19843
|
+
const { unreadCount, unreadIds } = useMemo34(() => {
|
|
19703
19844
|
const unreadNotifications2 = notifications.filter((notif) => !notif.isRead);
|
|
19704
19845
|
return {
|
|
19705
19846
|
unreadCount: unreadNotifications2.length,
|
|
@@ -20129,11 +20270,11 @@ function ReferralDialog({
|
|
|
20129
20270
|
__name(ReferralDialog, "ReferralDialog");
|
|
20130
20271
|
|
|
20131
20272
|
// src/features/role/components/details/RoleDetails.tsx
|
|
20132
|
-
import { useTranslations as
|
|
20273
|
+
import { useTranslations as useTranslations99 } from "next-intl";
|
|
20133
20274
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
20134
20275
|
function RoleDetails() {
|
|
20135
20276
|
const { role } = useRoleContext();
|
|
20136
|
-
const t =
|
|
20277
|
+
const t = useTranslations99();
|
|
20137
20278
|
if (!role) return null;
|
|
20138
20279
|
return /* @__PURE__ */ jsx233(Card, { className: "w-full", children: /* @__PURE__ */ jsx233(CardContent, { className: "p-4", children: /* @__PURE__ */ jsx233(AttributeElement, { title: t(`role.fields.description.label`), value: role.description }) }) });
|
|
20139
20280
|
}
|
|
@@ -20152,10 +20293,10 @@ function RoleContainer() {
|
|
|
20152
20293
|
__name(RoleContainer, "RoleContainer");
|
|
20153
20294
|
|
|
20154
20295
|
// src/features/role/components/forms/FormRoles.tsx
|
|
20155
|
-
import { useTranslations as
|
|
20296
|
+
import { useTranslations as useTranslations100 } from "next-intl";
|
|
20156
20297
|
import { jsx as jsx235, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
20157
20298
|
function FormRoles({ form, id, name, roles }) {
|
|
20158
|
-
const t =
|
|
20299
|
+
const t = useTranslations100();
|
|
20159
20300
|
const { hasAccesToFeature } = useCurrentUserContext();
|
|
20160
20301
|
return /* @__PURE__ */ jsx235("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx235(FormFieldWrapper, { form, name: id, label: name, children: (field) => /* @__PURE__ */ jsx235("div", { className: "flex w-full flex-col gap-y-1", children: roles.filter((role) => role.isSelectable).sort((a, b) => a.name.localeCompare(b.name)).map((role) => {
|
|
20161
20302
|
if (role.requiredFeature && !hasAccesToFeature(role.requiredFeature.id)) return null;
|
|
@@ -20187,13 +20328,13 @@ function FormRoles({ form, id, name, roles }) {
|
|
|
20187
20328
|
__name(FormRoles, "FormRoles");
|
|
20188
20329
|
|
|
20189
20330
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
20190
|
-
import { useTranslations as
|
|
20331
|
+
import { useTranslations as useTranslations101 } from "next-intl";
|
|
20191
20332
|
import { useEffect as useEffect67, useState as useState89 } from "react";
|
|
20192
20333
|
import { Fragment as Fragment50, jsx as jsx236, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
20193
20334
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
20194
20335
|
const [open, setOpen] = useState89(false);
|
|
20195
20336
|
const [canRemove, setCanRemove] = useState89(false);
|
|
20196
|
-
const t =
|
|
20337
|
+
const t = useTranslations101();
|
|
20197
20338
|
useEffect67(() => {
|
|
20198
20339
|
async function checkCompanyAdminDeletability() {
|
|
20199
20340
|
const roleUsers = await UserService.findAllUsersByRole({
|
|
@@ -20263,7 +20404,7 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
20263
20404
|
|
|
20264
20405
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
20265
20406
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
20266
|
-
import { useTranslations as
|
|
20407
|
+
import { useTranslations as useTranslations102 } from "next-intl";
|
|
20267
20408
|
import { useCallback as useCallback41, useEffect as useEffect68, useRef as useRef37, useState as useState90 } from "react";
|
|
20268
20409
|
import { Fragment as Fragment51, jsx as jsx237, jsxs as jsxs147 } from "react/jsx-runtime";
|
|
20269
20410
|
function UserRoleAdd({ user, refresh }) {
|
|
@@ -20271,7 +20412,7 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
20271
20412
|
const inputRef = useRef37(null);
|
|
20272
20413
|
const [searchTerm, setSearchTerm] = useState90("");
|
|
20273
20414
|
const [roles, setRoles] = useState90([]);
|
|
20274
|
-
const t =
|
|
20415
|
+
const t = useTranslations102();
|
|
20275
20416
|
const addUserToRole = /* @__PURE__ */ __name(async (role) => {
|
|
20276
20417
|
await RoleService.addUserToRole({
|
|
20277
20418
|
roleId: role.id,
|
|
@@ -20360,10 +20501,10 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
20360
20501
|
__name(UserRoleAdd, "UserRoleAdd");
|
|
20361
20502
|
|
|
20362
20503
|
// src/features/role/components/lists/RolesList.tsx
|
|
20363
|
-
import { useTranslations as
|
|
20504
|
+
import { useTranslations as useTranslations103 } from "next-intl";
|
|
20364
20505
|
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
20365
20506
|
function RolesList() {
|
|
20366
|
-
const t =
|
|
20507
|
+
const t = useTranslations103();
|
|
20367
20508
|
const data = useDataListRetriever({
|
|
20368
20509
|
retriever: /* @__PURE__ */ __name((params) => RoleService.findAllRoles(params), "retriever"),
|
|
20369
20510
|
retrieverParams: {},
|
|
@@ -20382,10 +20523,10 @@ function RolesList() {
|
|
|
20382
20523
|
__name(RolesList, "RolesList");
|
|
20383
20524
|
|
|
20384
20525
|
// src/features/role/components/lists/UserRolesList.tsx
|
|
20385
|
-
import { useTranslations as
|
|
20526
|
+
import { useTranslations as useTranslations104 } from "next-intl";
|
|
20386
20527
|
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
20387
20528
|
function UserRolesList({ user }) {
|
|
20388
|
-
const t =
|
|
20529
|
+
const t = useTranslations104();
|
|
20389
20530
|
const data = useDataListRetriever({
|
|
20390
20531
|
retriever: /* @__PURE__ */ __name((params) => RoleService.findAllRolesByUser(params), "retriever"),
|
|
20391
20532
|
retrieverParams: { userId: user.id },
|
|
@@ -21190,7 +21331,7 @@ __name(OAuthConsentScreen, "OAuthConsentScreen");
|
|
|
21190
21331
|
// src/features/waitlist/components/forms/WaitlistForm.tsx
|
|
21191
21332
|
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
21192
21333
|
import { CheckCircle, Mail as Mail2 } from "lucide-react";
|
|
21193
|
-
import { useTranslations as
|
|
21334
|
+
import { useTranslations as useTranslations105 } from "next-intl";
|
|
21194
21335
|
import { useState as useState94 } from "react";
|
|
21195
21336
|
import { useForm as useForm10 } from "react-hook-form";
|
|
21196
21337
|
import { v4 as v411 } from "uuid";
|
|
@@ -21291,7 +21432,7 @@ __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
|
|
|
21291
21432
|
// src/features/waitlist/components/forms/WaitlistForm.tsx
|
|
21292
21433
|
import { Fragment as Fragment53, jsx as jsx252, jsxs as jsxs160 } from "react/jsx-runtime";
|
|
21293
21434
|
function WaitlistForm({ onSuccess }) {
|
|
21294
|
-
const t =
|
|
21435
|
+
const t = useTranslations105();
|
|
21295
21436
|
const [isSubmitting, setIsSubmitting] = useState94(false);
|
|
21296
21437
|
const [isSuccess, setIsSuccess] = useState94(false);
|
|
21297
21438
|
const config = getWaitlistConfig();
|
|
@@ -21456,10 +21597,10 @@ __name(WaitlistHeroSection, "WaitlistHeroSection");
|
|
|
21456
21597
|
|
|
21457
21598
|
// src/features/waitlist/components/sections/WaitlistSuccessState.tsx
|
|
21458
21599
|
import { CheckCircle as CheckCircle3 } from "lucide-react";
|
|
21459
|
-
import { useTranslations as
|
|
21600
|
+
import { useTranslations as useTranslations106 } from "next-intl";
|
|
21460
21601
|
import { jsx as jsx254, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
21461
21602
|
function WaitlistSuccessState() {
|
|
21462
|
-
const t =
|
|
21603
|
+
const t = useTranslations106();
|
|
21463
21604
|
return /* @__PURE__ */ jsxs162("div", { className: "flex flex-col items-center justify-center space-y-4 py-8 text-center", children: [
|
|
21464
21605
|
/* @__PURE__ */ jsx254("div", { className: "bg-primary/10 rounded-full p-4", children: /* @__PURE__ */ jsx254(CheckCircle3, { className: "text-primary h-12 w-12" }) }),
|
|
21465
21606
|
/* @__PURE__ */ jsx254("h2", { className: "text-2xl font-bold", children: t("waitlist.success.title") }),
|
|
@@ -21471,11 +21612,11 @@ __name(WaitlistSuccessState, "WaitlistSuccessState");
|
|
|
21471
21612
|
|
|
21472
21613
|
// src/features/waitlist/components/sections/WaitlistConfirmation.tsx
|
|
21473
21614
|
import { CheckCircle as CheckCircle4, Loader2 as Loader27, XCircle as XCircle2 } from "lucide-react";
|
|
21474
|
-
import { useTranslations as
|
|
21615
|
+
import { useTranslations as useTranslations107 } from "next-intl";
|
|
21475
21616
|
import { useEffect as useEffect69, useState as useState95 } from "react";
|
|
21476
21617
|
import { jsx as jsx255, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
21477
21618
|
function WaitlistConfirmation({ code }) {
|
|
21478
|
-
const t =
|
|
21619
|
+
const t = useTranslations107();
|
|
21479
21620
|
const [state, setState] = useState95("loading");
|
|
21480
21621
|
const [errorMessage, setErrorMessage] = useState95("");
|
|
21481
21622
|
useEffect69(() => {
|
|
@@ -21517,12 +21658,12 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
|
|
|
21517
21658
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
21518
21659
|
import { flexRender as flexRender2, getCoreRowModel as getCoreRowModel2, useReactTable as useReactTable2 } from "@tanstack/react-table";
|
|
21519
21660
|
import { RefreshCw as RefreshCw4, Users as Users2 } from "lucide-react";
|
|
21520
|
-
import { useTranslations as
|
|
21661
|
+
import { useTranslations as useTranslations109 } from "next-intl";
|
|
21521
21662
|
import { useCallback as useCallback47, useEffect as useEffect70, useState as useState96 } from "react";
|
|
21522
21663
|
|
|
21523
21664
|
// src/features/waitlist/hooks/useWaitlistTableStructure.tsx
|
|
21524
21665
|
import { Send } from "lucide-react";
|
|
21525
|
-
import { useTranslations as
|
|
21666
|
+
import { useTranslations as useTranslations108 } from "next-intl";
|
|
21526
21667
|
import { jsx as jsx256, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
21527
21668
|
function parseQuestionnaire(questionnaire) {
|
|
21528
21669
|
if (!questionnaire) return null;
|
|
@@ -21536,7 +21677,7 @@ __name(parseQuestionnaire, "parseQuestionnaire");
|
|
|
21536
21677
|
function useWaitlistTableStructure({
|
|
21537
21678
|
onInvite
|
|
21538
21679
|
}) {
|
|
21539
|
-
const t =
|
|
21680
|
+
const t = useTranslations108();
|
|
21540
21681
|
const getStatusBadge = /* @__PURE__ */ __name((status) => {
|
|
21541
21682
|
const variants = {
|
|
21542
21683
|
pending: { variant: "secondary" },
|
|
@@ -21614,7 +21755,7 @@ __name(useWaitlistTableStructure, "useWaitlistTableStructure");
|
|
|
21614
21755
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
21615
21756
|
import { jsx as jsx257, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
21616
21757
|
function WaitlistList() {
|
|
21617
|
-
const t =
|
|
21758
|
+
const t = useTranslations109();
|
|
21618
21759
|
const [entries, setEntries] = useState96([]);
|
|
21619
21760
|
const [total, setTotal] = useState96(0);
|
|
21620
21761
|
const [isLoading, setIsLoading] = useState96(true);
|
|
@@ -21687,8 +21828,8 @@ __name(WaitlistList, "WaitlistList");
|
|
|
21687
21828
|
|
|
21688
21829
|
// src/features/rbac/components/RbacContainer.tsx
|
|
21689
21830
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
21690
|
-
import { useTranslations as
|
|
21691
|
-
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect72, useMemo as
|
|
21831
|
+
import { useTranslations as useTranslations111 } from "next-intl";
|
|
21832
|
+
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect72, useMemo as useMemo35, useRef as useRef38, useState as useState98 } from "react";
|
|
21692
21833
|
|
|
21693
21834
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
21694
21835
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon11 } from "lucide-react";
|
|
@@ -21768,7 +21909,7 @@ __name(RbacPermissionCell, "RbacPermissionCell");
|
|
|
21768
21909
|
// src/features/rbac/components/RbacPermissionPicker.tsx
|
|
21769
21910
|
import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
21770
21911
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon12 } from "lucide-react";
|
|
21771
|
-
import { useTranslations as
|
|
21912
|
+
import { useTranslations as useTranslations110 } from "next-intl";
|
|
21772
21913
|
import { useCallback as useCallback48, useEffect as useEffect71, useState as useState97 } from "react";
|
|
21773
21914
|
import { Fragment as Fragment54, jsx as jsx259, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
21774
21915
|
function RbacPermissionPicker({
|
|
@@ -21781,7 +21922,7 @@ function RbacPermissionPicker({
|
|
|
21781
21922
|
onClear,
|
|
21782
21923
|
onClose
|
|
21783
21924
|
}) {
|
|
21784
|
-
const t =
|
|
21925
|
+
const t = useTranslations110();
|
|
21785
21926
|
const [customSegment, setCustomSegment] = useState97("");
|
|
21786
21927
|
useEffect71(() => {
|
|
21787
21928
|
if (!open) setCustomSegment("");
|
|
@@ -21979,7 +22120,7 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
|
|
|
21979
22120
|
roleNames,
|
|
21980
22121
|
onOpenPicker
|
|
21981
22122
|
}) {
|
|
21982
|
-
const t =
|
|
22123
|
+
const t = useTranslations111();
|
|
21983
22124
|
const defaultTokens = block.default ?? [];
|
|
21984
22125
|
return /* @__PURE__ */ jsxs168("div", { className: "rounded-lg border border-accent bg-card", children: [
|
|
21985
22126
|
/* @__PURE__ */ jsxs168("div", { className: "flex items-center justify-between border-b px-4 py-2", children: [
|
|
@@ -22029,7 +22170,7 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
|
|
|
22029
22170
|
] });
|
|
22030
22171
|
}, "ModuleEditor"));
|
|
22031
22172
|
function RbacContainer() {
|
|
22032
|
-
const t =
|
|
22173
|
+
const t = useTranslations111();
|
|
22033
22174
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
22034
22175
|
const [selectedModuleId, setSelectedModuleId] = useState98(null);
|
|
22035
22176
|
const [activePicker, setActivePicker] = useState98(null);
|
|
@@ -22043,11 +22184,11 @@ function RbacContainer() {
|
|
|
22043
22184
|
setSelectedModuleId(id);
|
|
22044
22185
|
setActivePicker(null);
|
|
22045
22186
|
}, []);
|
|
22046
|
-
const sortedModuleIds =
|
|
22187
|
+
const sortedModuleIds = useMemo35(() => {
|
|
22047
22188
|
if (!matrix) return [];
|
|
22048
22189
|
return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
|
|
22049
22190
|
}, [matrix, moduleNames]);
|
|
22050
|
-
const roleIds =
|
|
22191
|
+
const roleIds = useMemo35(() => {
|
|
22051
22192
|
if (roleNames) {
|
|
22052
22193
|
return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
|
|
22053
22194
|
}
|
|
@@ -22065,14 +22206,14 @@ function RbacContainer() {
|
|
|
22065
22206
|
setSelectedModuleId(sortedModuleIds[0]);
|
|
22066
22207
|
}
|
|
22067
22208
|
}, [selectedModuleId, sortedModuleIds]);
|
|
22068
|
-
const activeValue =
|
|
22209
|
+
const activeValue = useMemo35(() => {
|
|
22069
22210
|
if (!activePicker || !matrix) return void 0;
|
|
22070
22211
|
const block = matrix[activePicker.moduleId];
|
|
22071
22212
|
if (!block) return void 0;
|
|
22072
22213
|
const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
|
|
22073
22214
|
return cellValue(tokens, activePicker.action);
|
|
22074
22215
|
}, [activePicker, matrix]);
|
|
22075
|
-
const activeSegments =
|
|
22216
|
+
const activeSegments = useMemo35(() => {
|
|
22076
22217
|
if (!activePicker) return [];
|
|
22077
22218
|
return modulePaths[activePicker.moduleId] ?? [];
|
|
22078
22219
|
}, [activePicker, modulePaths]);
|
|
@@ -22142,8 +22283,8 @@ __name(RbacContainer, "RbacContainer");
|
|
|
22142
22283
|
|
|
22143
22284
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
22144
22285
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
22145
|
-
import { useTranslations as
|
|
22146
|
-
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect73, useMemo as
|
|
22286
|
+
import { useTranslations as useTranslations112 } from "next-intl";
|
|
22287
|
+
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo36, useRef as useRef39, useState as useState99 } from "react";
|
|
22147
22288
|
import { jsx as jsx261, jsxs as jsxs169 } from "react/jsx-runtime";
|
|
22148
22289
|
function findToken2(tokens, action) {
|
|
22149
22290
|
if (!tokens) return void 0;
|
|
@@ -22179,7 +22320,7 @@ var ACTION_LABELS2 = {
|
|
|
22179
22320
|
delete: "Delete"
|
|
22180
22321
|
};
|
|
22181
22322
|
function RbacByRoleContainer() {
|
|
22182
|
-
const t =
|
|
22323
|
+
const t = useTranslations112();
|
|
22183
22324
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
22184
22325
|
const [selectedRoleId, setSelectedRoleId] = useState99(null);
|
|
22185
22326
|
const [activePicker, setActivePicker] = useState99(null);
|
|
@@ -22193,11 +22334,11 @@ function RbacByRoleContainer() {
|
|
|
22193
22334
|
setSelectedRoleId(id);
|
|
22194
22335
|
setActivePicker(null);
|
|
22195
22336
|
}, []);
|
|
22196
|
-
const sortedRoleIds =
|
|
22337
|
+
const sortedRoleIds = useMemo36(() => {
|
|
22197
22338
|
if (!roleNames) return [];
|
|
22198
22339
|
return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
|
|
22199
22340
|
}, [roleNames]);
|
|
22200
|
-
const sortedModuleIds =
|
|
22341
|
+
const sortedModuleIds = useMemo36(() => {
|
|
22201
22342
|
if (!matrix) return [];
|
|
22202
22343
|
return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
|
|
22203
22344
|
}, [matrix, moduleNames]);
|
|
@@ -22206,14 +22347,14 @@ function RbacByRoleContainer() {
|
|
|
22206
22347
|
setSelectedRoleId(sortedRoleIds[0]);
|
|
22207
22348
|
}
|
|
22208
22349
|
}, [selectedRoleId, sortedRoleIds]);
|
|
22209
|
-
const activeValue =
|
|
22350
|
+
const activeValue = useMemo36(() => {
|
|
22210
22351
|
if (!activePicker || !matrix) return void 0;
|
|
22211
22352
|
const block = matrix[activePicker.moduleId];
|
|
22212
22353
|
if (!block) return void 0;
|
|
22213
22354
|
const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
|
|
22214
22355
|
return cellValue2(tokens, activePicker.action);
|
|
22215
22356
|
}, [activePicker, matrix]);
|
|
22216
|
-
const activeSegments =
|
|
22357
|
+
const activeSegments = useMemo36(() => {
|
|
22217
22358
|
if (!activePicker) return [];
|
|
22218
22359
|
return modulePaths[activePicker.moduleId] ?? [];
|
|
22219
22360
|
}, [activePicker, modulePaths]);
|
|
@@ -22674,6 +22815,7 @@ export {
|
|
|
22674
22815
|
CommonEditorHeader,
|
|
22675
22816
|
CommonEditorDiscardDialog,
|
|
22676
22817
|
CommonEditorTrigger,
|
|
22818
|
+
CommonAddTrigger,
|
|
22677
22819
|
useEditorDialog,
|
|
22678
22820
|
EditorSheet,
|
|
22679
22821
|
DatePickerPopover,
|
|
@@ -22842,4 +22984,4 @@ export {
|
|
|
22842
22984
|
useOAuthClients,
|
|
22843
22985
|
useOAuthClient
|
|
22844
22986
|
};
|
|
22845
|
-
//# sourceMappingURL=chunk-
|
|
22987
|
+
//# sourceMappingURL=chunk-6D4GJHLK.mjs.map
|