@carlonicora/nextjs-jsonapi 1.123.1 → 1.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-4UBKHQHZ.mjs → BlockNoteEditor-JSY65RSG.mjs} +2 -2
- package/dist/{BlockNoteEditor-JWE5R6TH.js → BlockNoteEditor-PFA6IAEL.js} +9 -9
- package/dist/{BlockNoteEditor-JWE5R6TH.js.map → BlockNoteEditor-PFA6IAEL.js.map} +1 -1
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-NHTN4LWQ.js → chunk-LJLXNH2Z.js} +851 -596
- package/dist/chunk-LJLXNH2Z.js.map +1 -0
- package/dist/{chunk-WDWU5VJ5.mjs → chunk-RSIVJ3VJ.mjs} +3136 -2881
- package/dist/chunk-RSIVJ3VJ.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +179 -123
- package/dist/components/index.d.ts +179 -123
- package/dist/components/index.js +12 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/help/index.js +30 -30
- package/dist/features/help/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/forms/EntityMultiSelector.tsx +15 -3
- package/src/components/forms/EntitySelector.tsx +256 -0
- package/src/components/forms/FormLayout.tsx +58 -0
- package/src/components/forms/index.ts +10 -8
- package/src/components/forms/useEditorDialog.ts +21 -4
- package/src/components/tables/ContentTableSearch.tsx +2 -0
- package/dist/chunk-NHTN4LWQ.js.map +0 -1
- package/dist/chunk-WDWU5VJ5.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-4UBKHQHZ.mjs.map → BlockNoteEditor-JSY65RSG.mjs.map} +0 -0
|
@@ -8247,7 +8247,10 @@ function EntityMultiSelector({
|
|
|
8247
8247
|
getFormValueLabel,
|
|
8248
8248
|
excludeId,
|
|
8249
8249
|
onChange,
|
|
8250
|
-
renderOption
|
|
8250
|
+
renderOption,
|
|
8251
|
+
ready = true,
|
|
8252
|
+
description,
|
|
8253
|
+
disabled = false
|
|
8251
8254
|
}) {
|
|
8252
8255
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8253
8256
|
const [searchTerm, setSearchTerm] = _react.useState.call(void 0, "");
|
|
@@ -8282,9 +8285,12 @@ function EntityMultiSelector({
|
|
|
8282
8285
|
const data = useDataListRetriever({
|
|
8283
8286
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => retriever(params), "retriever"),
|
|
8284
8287
|
retrieverParams,
|
|
8285
|
-
ready
|
|
8288
|
+
ready,
|
|
8286
8289
|
module
|
|
8287
8290
|
});
|
|
8291
|
+
_react.useEffect.call(void 0, () => {
|
|
8292
|
+
if (ready) data.setReady(true);
|
|
8293
|
+
}, [ready]);
|
|
8288
8294
|
const updateSearch = _react.useCallback.call(void 0,
|
|
8289
8295
|
(searchedTerm) => {
|
|
8290
8296
|
if (searchedTerm.trim()) {
|
|
@@ -8369,15 +8375,21 @@ function EntityMultiSelector({
|
|
|
8369
8375
|
if (selectedValues.length === 0) return null;
|
|
8370
8376
|
return selectedValues.map((v) => stableGetFormValueLabel(v)).join(", ");
|
|
8371
8377
|
}, [selectedValues, stableGetFormValueLabel]);
|
|
8372
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
8378
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, description, children: () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
8373
8379
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
8374
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8380
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8381
|
+
"div",
|
|
8382
|
+
{
|
|
8383
|
+
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 w-full items-center gap-2 rounded-md border px-2 text-sm md:text-xs/relaxed`,
|
|
8384
|
+
children: [
|
|
8385
|
+
selectedValues.length > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
8386
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground min-w-0 flex-1 truncate text-left", children: triggerSummary }),
|
|
8387
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "bg-primary/10 text-primary shrink-0 rounded-full px-1.5 py-0.5 text-xs font-medium", children: selectedValues.length })
|
|
8388
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground flex-1 text-left", children: placeholder }),
|
|
8389
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
|
|
8390
|
+
]
|
|
8391
|
+
}
|
|
8392
|
+
) }),
|
|
8381
8393
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverContent, { className: "w-(--anchor-width) flex flex-col gap-0 p-0", align: "start", children: [
|
|
8382
8394
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative p-1.5", children: [
|
|
8383
8395
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, { className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3.5 size-3.5 -translate-y-1/2" }),
|
|
@@ -8617,6 +8629,41 @@ _chunk7QVYU63Ejs.__name.call(void 0, UserResentInvitationEmail, "UserResentInvit
|
|
|
8617
8629
|
|
|
8618
8630
|
|
|
8619
8631
|
|
|
8632
|
+
// src/features/feature/components/forms/FormFeatures.tsx
|
|
8633
|
+
|
|
8634
|
+
function FormFeatures({ form, name, features, featureField = "featureIds" }) {
|
|
8635
|
+
const selectedFeatures = form.watch(featureField);
|
|
8636
|
+
const toggleFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature, checked) => {
|
|
8637
|
+
let newFeatureIds = [...selectedFeatures];
|
|
8638
|
+
if (checked) {
|
|
8639
|
+
if (!newFeatureIds.includes(feature.id)) {
|
|
8640
|
+
newFeatureIds.push(feature.id);
|
|
8641
|
+
}
|
|
8642
|
+
} else {
|
|
8643
|
+
newFeatureIds = newFeatureIds.filter((id) => id !== feature.id);
|
|
8644
|
+
}
|
|
8645
|
+
form.setValue(featureField, newFeatureIds);
|
|
8646
|
+
}, "toggleFeature");
|
|
8647
|
+
const isFeatureChecked = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature) => selectedFeatures.includes(feature.id), "isFeatureChecked");
|
|
8648
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
8649
|
+
name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-4 border-b text-lg font-semibold", children: name }),
|
|
8650
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-[40vh]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-2 pr-4", children: features.filter((feature) => !feature.isCore).map((feature) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center", children: [
|
|
8651
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8652
|
+
Checkbox,
|
|
8653
|
+
{
|
|
8654
|
+
id: feature.id,
|
|
8655
|
+
checked: isFeatureChecked(feature),
|
|
8656
|
+
onCheckedChange: (val) => {
|
|
8657
|
+
toggleFeature(feature, val === true);
|
|
8658
|
+
}
|
|
8659
|
+
}
|
|
8660
|
+
),
|
|
8661
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: feature.id, className: "ml-3 cursor-pointer font-normal", children: feature.name })
|
|
8662
|
+
] }, feature.id)) }) })
|
|
8663
|
+
] });
|
|
8664
|
+
}
|
|
8665
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormFeatures, "FormFeatures");
|
|
8666
|
+
|
|
8620
8667
|
// src/components/forms/CommonAssociationForm.tsx
|
|
8621
8668
|
|
|
8622
8669
|
|
|
@@ -8887,6 +8934,24 @@ function CommonEditorButtons({
|
|
|
8887
8934
|
}
|
|
8888
8935
|
_chunk7QVYU63Ejs.__name.call(void 0, CommonEditorButtons, "CommonEditorButtons");
|
|
8889
8936
|
|
|
8937
|
+
// src/components/forms/CommonEditorDiscardDialog.tsx
|
|
8938
|
+
|
|
8939
|
+
|
|
8940
|
+
function CommonEditorDiscardDialog({ open, onOpenChange, onDiscard }) {
|
|
8941
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
8942
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogContent, { children: [
|
|
8943
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogHeader, { children: [
|
|
8944
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTitle, { children: t(`ui.dialogs.unsaved_changes_title`) }),
|
|
8945
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogDescription, { children: t(`ui.dialogs.unsaved_changes_description`) })
|
|
8946
|
+
] }),
|
|
8947
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogFooter, { children: [
|
|
8948
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogCancel, { children: t(`ui.buttons.cancel`) }),
|
|
8949
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogAction, { variant: "destructive", onClick: onDiscard, children: t(`ui.dialogs.unsaved_changes_discard`) })
|
|
8950
|
+
] })
|
|
8951
|
+
] }) });
|
|
8952
|
+
}
|
|
8953
|
+
_chunk7QVYU63Ejs.__name.call(void 0, CommonEditorDiscardDialog, "CommonEditorDiscardDialog");
|
|
8954
|
+
|
|
8890
8955
|
// src/components/forms/CommonEditorHeader.tsx
|
|
8891
8956
|
|
|
8892
8957
|
|
|
@@ -8906,24 +8971,6 @@ function CommonEditorHeader({ type, name, title, description }) {
|
|
|
8906
8971
|
}
|
|
8907
8972
|
_chunk7QVYU63Ejs.__name.call(void 0, CommonEditorHeader, "CommonEditorHeader");
|
|
8908
8973
|
|
|
8909
|
-
// src/components/forms/CommonEditorDiscardDialog.tsx
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
function CommonEditorDiscardDialog({ open, onOpenChange, onDiscard }) {
|
|
8913
|
-
const t = _nextintl.useTranslations.call(void 0, );
|
|
8914
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogContent, { children: [
|
|
8915
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogHeader, { children: [
|
|
8916
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTitle, { children: t(`ui.dialogs.unsaved_changes_title`) }),
|
|
8917
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogDescription, { children: t(`ui.dialogs.unsaved_changes_description`) })
|
|
8918
|
-
] }),
|
|
8919
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogFooter, { children: [
|
|
8920
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogCancel, { children: t(`ui.buttons.cancel`) }),
|
|
8921
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogAction, { variant: "destructive", onClick: onDiscard, children: t(`ui.dialogs.unsaved_changes_discard`) })
|
|
8922
|
-
] })
|
|
8923
|
-
] }) });
|
|
8924
|
-
}
|
|
8925
|
-
_chunk7QVYU63Ejs.__name.call(void 0, CommonEditorDiscardDialog, "CommonEditorDiscardDialog");
|
|
8926
|
-
|
|
8927
8974
|
// src/components/forms/CommonEditorTrigger.tsx
|
|
8928
8975
|
|
|
8929
8976
|
|
|
@@ -8950,221 +8997,86 @@ var CommonAddTrigger = React.default.forwardRef(
|
|
|
8950
8997
|
);
|
|
8951
8998
|
CommonAddTrigger.displayName = "CommonAddTrigger";
|
|
8952
8999
|
|
|
8953
|
-
// src/components/forms/
|
|
9000
|
+
// src/components/forms/CurrencyInput.tsx
|
|
8954
9001
|
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
}
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
[
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
const
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9002
|
+
|
|
9003
|
+
function centsToInput(cents) {
|
|
9004
|
+
return (cents / 100).toFixed(2);
|
|
9005
|
+
}
|
|
9006
|
+
_chunk7QVYU63Ejs.__name.call(void 0, centsToInput, "centsToInput");
|
|
9007
|
+
function parseInput(raw) {
|
|
9008
|
+
if (!raw || raw.trim() === "") return 0;
|
|
9009
|
+
const trimmed = raw.trim();
|
|
9010
|
+
const lastComma = trimmed.lastIndexOf(",");
|
|
9011
|
+
const lastDot = trimmed.lastIndexOf(".");
|
|
9012
|
+
let normalized;
|
|
9013
|
+
if (lastComma > lastDot) {
|
|
9014
|
+
normalized = trimmed.replace(/\./g, "").replace(",", ".");
|
|
9015
|
+
} else if (lastDot > lastComma) {
|
|
9016
|
+
normalized = trimmed.replace(/,/g, "");
|
|
9017
|
+
} else {
|
|
9018
|
+
normalized = trimmed.replace(",", ".");
|
|
9019
|
+
}
|
|
9020
|
+
const parsed = parseFloat(normalized);
|
|
9021
|
+
if (Number.isNaN(parsed)) return 0;
|
|
9022
|
+
return Math.round(parsed * 100);
|
|
9023
|
+
}
|
|
9024
|
+
_chunk7QVYU63Ejs.__name.call(void 0, parseInput, "parseInput");
|
|
9025
|
+
function sanitizeKeystroke(raw) {
|
|
9026
|
+
let value = raw.replace(/[^0-9.,-]/g, "");
|
|
9027
|
+
const firstSep = value.search(/[.,]/);
|
|
9028
|
+
if (firstSep !== -1) {
|
|
9029
|
+
const sep = value[firstSep];
|
|
9030
|
+
const before = value.slice(0, firstSep);
|
|
9031
|
+
const after = value.slice(firstSep + 1).replace(/[.,]/g, "");
|
|
9032
|
+
value = before + sep + after;
|
|
9033
|
+
}
|
|
9034
|
+
return value;
|
|
9035
|
+
}
|
|
9036
|
+
_chunk7QVYU63Ejs.__name.call(void 0, sanitizeKeystroke, "sanitizeKeystroke");
|
|
9037
|
+
function CurrencyInput({
|
|
9038
|
+
valueCents,
|
|
9039
|
+
onChange,
|
|
9040
|
+
currencySymbol = "\u20AC",
|
|
9041
|
+
readOnly,
|
|
9042
|
+
disabled,
|
|
9043
|
+
placeholder,
|
|
9044
|
+
className,
|
|
9045
|
+
testId
|
|
9046
|
+
}) {
|
|
9047
|
+
const [draft, setDraft] = _react.useState.call(void 0, null);
|
|
9048
|
+
const display = draft !== null ? draft : centsToInput(valueCents);
|
|
9049
|
+
const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
9050
|
+
setDraft(sanitizeKeystroke(e.target.value));
|
|
9051
|
+
}, "handleChange");
|
|
9052
|
+
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9053
|
+
if (draft === null) return;
|
|
9054
|
+
onChange(parseInput(draft));
|
|
9055
|
+
setDraft(null);
|
|
9056
|
+
}, "handleBlur");
|
|
9057
|
+
const sharedProps = {
|
|
9058
|
+
type: "text",
|
|
9059
|
+
inputMode: "decimal",
|
|
9060
|
+
value: display,
|
|
9061
|
+
readOnly,
|
|
9062
|
+
disabled,
|
|
9063
|
+
placeholder,
|
|
9064
|
+
onChange: handleChange,
|
|
9065
|
+
onBlur: handleBlur,
|
|
9066
|
+
"data-testid": testId
|
|
9008
9067
|
};
|
|
9009
|
-
|
|
9068
|
+
if (!currencySymbol) {
|
|
9069
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Input, { ...sharedProps, className: `text-end ${_nullishCoalesce(className, () => ( ""))}`.trim() });
|
|
9070
|
+
}
|
|
9071
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputGroup, { children: [
|
|
9072
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupText, { children: currencySymbol }) }),
|
|
9073
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupInput, { ...sharedProps, className: `text-end ${_nullishCoalesce(className, () => ( ""))}`.trim() })
|
|
9074
|
+
] });
|
|
9010
9075
|
}
|
|
9011
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
9012
|
-
|
|
9013
|
-
// src/components/forms/EditorSheet.tsx
|
|
9076
|
+
_chunk7QVYU63Ejs.__name.call(void 0, CurrencyInput, "CurrencyInput");
|
|
9014
9077
|
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
var sizeClasses = {
|
|
9019
|
-
sm: "data-[side=right]:sm:max-w-2xl",
|
|
9020
|
-
md: "data-[side=right]:sm:max-w-3xl",
|
|
9021
|
-
lg: "data-[side=right]:sm:max-w-5xl",
|
|
9022
|
-
xl: "data-[side=right]:sm:max-w-7xl",
|
|
9023
|
-
"2xl": "data-[side=right]:sm:!max-w-[min(96rem,90vw)]"
|
|
9024
|
-
};
|
|
9025
|
-
function EditorSheet({
|
|
9026
|
-
form,
|
|
9027
|
-
onSubmit,
|
|
9028
|
-
onReset,
|
|
9029
|
-
isFormDirty: isFormDirtyProp,
|
|
9030
|
-
entityType,
|
|
9031
|
-
entityName,
|
|
9032
|
-
title: titleOverride,
|
|
9033
|
-
description: descriptionOverride,
|
|
9034
|
-
isEdit,
|
|
9035
|
-
module,
|
|
9036
|
-
propagateChanges,
|
|
9037
|
-
onSuccess,
|
|
9038
|
-
onRevalidate,
|
|
9039
|
-
onNavigate,
|
|
9040
|
-
onSaved,
|
|
9041
|
-
size = "xl",
|
|
9042
|
-
disabled,
|
|
9043
|
-
hideSubmit,
|
|
9044
|
-
centerButtons,
|
|
9045
|
-
trigger,
|
|
9046
|
-
forceShow,
|
|
9047
|
-
onClose,
|
|
9048
|
-
dialogOpen,
|
|
9049
|
-
onDialogOpenChange,
|
|
9050
|
-
renderFooter,
|
|
9051
|
-
actions,
|
|
9052
|
-
children
|
|
9053
|
-
}) {
|
|
9054
|
-
const t = _nextintl.useTranslations.call(void 0, );
|
|
9055
|
-
const generateUrl = usePageUrlGenerator();
|
|
9056
|
-
const defaultIsFormDirty = _react.useCallback.call(void 0, () => {
|
|
9057
|
-
return Object.keys(form.formState.dirtyFields).length > 0;
|
|
9058
|
-
}, [form.formState.dirtyFields]);
|
|
9059
|
-
const { open, setOpen, handleOpenChange, discardDialogProps } = useEditorDialog(
|
|
9060
|
-
_nullishCoalesce(isFormDirtyProp, () => ( defaultIsFormDirty)),
|
|
9061
|
-
{ dialogOpen, onDialogOpenChange, forceShow }
|
|
9062
|
-
);
|
|
9063
|
-
const hasBeenOpen = _react.useRef.call(void 0, false);
|
|
9064
|
-
_react.useEffect.call(void 0, () => {
|
|
9065
|
-
if (open) {
|
|
9066
|
-
hasBeenOpen.current = true;
|
|
9067
|
-
} else if (hasBeenOpen.current) {
|
|
9068
|
-
form.reset(onReset());
|
|
9069
|
-
_optionalChain([onClose, 'optionalCall', _257 => _257()]);
|
|
9070
|
-
}
|
|
9071
|
-
}, [open]);
|
|
9072
|
-
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
9073
|
-
async (values) => {
|
|
9074
|
-
try {
|
|
9075
|
-
const result = await onSubmit(values);
|
|
9076
|
-
setOpen(false);
|
|
9077
|
-
if (result && onSaved) {
|
|
9078
|
-
onSaved(result, entityType);
|
|
9079
|
-
}
|
|
9080
|
-
if (onSuccess) {
|
|
9081
|
-
await onSuccess();
|
|
9082
|
-
} else if (result) {
|
|
9083
|
-
_optionalChain([onRevalidate, 'optionalCall', _258 => _258(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
9084
|
-
if (isEdit && propagateChanges) {
|
|
9085
|
-
propagateChanges(result);
|
|
9086
|
-
} else {
|
|
9087
|
-
_optionalChain([onNavigate, 'optionalCall', _259 => _259(generateUrl({ page: module, id: result.id }))]);
|
|
9088
|
-
}
|
|
9089
|
-
}
|
|
9090
|
-
} catch (error) {
|
|
9091
|
-
errorToast({
|
|
9092
|
-
title: isEdit ? t("generic.errors.update") : t("generic.errors.create"),
|
|
9093
|
-
error
|
|
9094
|
-
});
|
|
9095
|
-
}
|
|
9096
|
-
},
|
|
9097
|
-
[onSubmit, setOpen, onSuccess, onSaved, onRevalidate, onNavigate, generateUrl, module, isEdit, propagateChanges, t]
|
|
9098
|
-
);
|
|
9099
|
-
const headerTitle = _nullishCoalesce(titleOverride, () => ( (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType }))));
|
|
9100
|
-
const headerDescription = _nullishCoalesce(descriptionOverride, () => ( (isEdit ? t("common.edit.update.description", { type: entityType, name: _nullishCoalesce(entityName, () => ( "")) }) : t("common.edit.create.description", { type: entityType }))));
|
|
9101
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9102
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Sheet, { open, onOpenChange: handleOpenChange, children: [
|
|
9103
|
-
dialogOpen === void 0 && forceShow === void 0 && (trigger ? (
|
|
9104
|
-
// Base UI: the trigger renders its own <button>. Pass the caller's
|
|
9105
|
-
// element via `render` (NOT as children) so it BECOMES the trigger
|
|
9106
|
-
// button — otherwise an interactive trigger (e.g. <Button>) nests a
|
|
9107
|
-
// <button> inside SheetTrigger's <button> (invalid HTML / hydration
|
|
9108
|
-
// error). `render` also preserves the element's native `disabled`.
|
|
9109
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTrigger, { render: trigger })
|
|
9110
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTrigger, { children: isEdit ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9111
|
-
Button,
|
|
9112
|
-
{
|
|
9113
|
-
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
|
|
9114
|
-
nativeButton: false,
|
|
9115
|
-
size: "sm",
|
|
9116
|
-
variant: "ghost",
|
|
9117
|
-
className: "text-muted-foreground",
|
|
9118
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {})
|
|
9119
|
-
}
|
|
9120
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("ui.buttons.create") }) })),
|
|
9121
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetContent, { side: "right", className: sizeClasses[size], children: [
|
|
9122
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetHeader, { className: "border-b px-6 py-4", children: actions ? (
|
|
9123
|
-
// pr-10 clears the SheetContent close button (absolute top-4 right-4).
|
|
9124
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start justify-between gap-x-4 pr-10", children: [
|
|
9125
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-y-1.5", children: [
|
|
9126
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: headerTitle }),
|
|
9127
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: headerDescription })
|
|
9128
|
-
] }),
|
|
9129
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex shrink-0 items-center gap-x-2", children: actions })
|
|
9130
|
-
] })
|
|
9131
|
-
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9132
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: headerTitle }),
|
|
9133
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: headerDescription })
|
|
9134
|
-
] }) }),
|
|
9135
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9136
|
-
"form",
|
|
9137
|
-
{
|
|
9138
|
-
onSubmit: (e) => {
|
|
9139
|
-
e.stopPropagation();
|
|
9140
|
-
return form.handleSubmit(wrappedOnSubmit)(e);
|
|
9141
|
-
},
|
|
9142
|
-
className: "flex min-h-0 flex-1 flex-col",
|
|
9143
|
-
children: [
|
|
9144
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
|
|
9145
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: renderFooter ? renderFooter({ form, isEdit, setOpen: handleOpenChange, closeWithoutConfirm: setOpen }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9146
|
-
CommonEditorButtons,
|
|
9147
|
-
{
|
|
9148
|
-
form,
|
|
9149
|
-
setOpen: handleOpenChange,
|
|
9150
|
-
isEdit,
|
|
9151
|
-
disabled,
|
|
9152
|
-
hideSubmit,
|
|
9153
|
-
centerButtons
|
|
9154
|
-
}
|
|
9155
|
-
) })
|
|
9156
|
-
]
|
|
9157
|
-
}
|
|
9158
|
-
) })
|
|
9159
|
-
] })
|
|
9160
|
-
] }),
|
|
9161
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorDiscardDialog, { ...discardDialogProps })
|
|
9162
|
-
] });
|
|
9163
|
-
}
|
|
9164
|
-
_chunk7QVYU63Ejs.__name.call(void 0, EditorSheet, "EditorSheet");
|
|
9165
|
-
|
|
9166
|
-
// src/components/forms/DatePickerPopover.tsx
|
|
9167
|
-
var _datefns = require('date-fns');
|
|
9078
|
+
// src/components/forms/DatePickerPopover.tsx
|
|
9079
|
+
var _datefns = require('date-fns');
|
|
9168
9080
|
|
|
9169
9081
|
|
|
9170
9082
|
|
|
@@ -9345,7 +9257,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9345
9257
|
}, []);
|
|
9346
9258
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
9347
9259
|
_react.useEffect.call(void 0, () => {
|
|
9348
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
9260
|
+
if (_optionalChain([date, 'optionalAccess', _250 => _250.from]) && _optionalChain([date, 'optionalAccess', _251 => _251.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _252 => _252.from, 'optionalAccess', _253 => _253.getTime, 'call', _254 => _254()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _255 => _255.to, 'optionalAccess', _256 => _256.getTime, 'call', _257 => _257()]) !== date.to.getTime())) {
|
|
9349
9261
|
onDateChange(date);
|
|
9350
9262
|
setPrevRange(date);
|
|
9351
9263
|
setOpen(false);
|
|
@@ -9356,7 +9268,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9356
9268
|
setDate(void 0);
|
|
9357
9269
|
return;
|
|
9358
9270
|
}
|
|
9359
|
-
if (range.from && (!_optionalChain([date, 'optionalAccess',
|
|
9271
|
+
if (range.from && (!_optionalChain([date, 'optionalAccess', _258 => _258.from]) || range.from.getTime() !== date.from.getTime())) {
|
|
9360
9272
|
setDate({ from: range.from, to: void 0 });
|
|
9361
9273
|
} else {
|
|
9362
9274
|
setDate(range);
|
|
@@ -9371,7 +9283,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9371
9283
|
className: _chunkPQBKPWBYjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
|
|
9372
9284
|
children: [
|
|
9373
9285
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9374
|
-
_optionalChain([date, 'optionalAccess',
|
|
9286
|
+
_optionalChain([date, 'optionalAccess', _259 => _259.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9375
9287
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9376
9288
|
" - ",
|
|
9377
9289
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -9391,48 +9303,456 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9391
9303
|
variant: "outline",
|
|
9392
9304
|
className: _chunkPQBKPWBYjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground")
|
|
9393
9305
|
}
|
|
9394
|
-
),
|
|
9395
|
-
children: [
|
|
9396
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9397
|
-
_optionalChain([date, 'optionalAccess',
|
|
9398
|
-
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9399
|
-
" - ",
|
|
9400
|
-
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
9401
|
-
] }) : _datefns.format.call(void 0, date.from, "LLL dd, y") : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("ui.labels.pick_a_date") })
|
|
9402
|
-
]
|
|
9403
|
-
}
|
|
9404
|
-
),
|
|
9405
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2 p-2", children: [
|
|
9406
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9407
|
-
Calendar,
|
|
9408
|
-
{
|
|
9409
|
-
mode: "range",
|
|
9410
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
9411
|
-
selected: date,
|
|
9412
|
-
onSelect: handleSelect,
|
|
9413
|
-
numberOfMonths: 2
|
|
9414
|
-
}
|
|
9415
|
-
),
|
|
9416
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9417
|
-
Button,
|
|
9418
|
-
{
|
|
9419
|
-
variant: "secondary",
|
|
9420
|
-
type: "button",
|
|
9421
|
-
onClick: () => {
|
|
9422
|
-
setDate(void 0);
|
|
9423
|
-
setPrevRange(void 0);
|
|
9424
|
-
onDateChange(void 0);
|
|
9425
|
-
setOpen(false);
|
|
9426
|
-
},
|
|
9427
|
-
className: "cursor-pointer",
|
|
9428
|
-
disabled: !date,
|
|
9429
|
-
children: t("ui.buttons.clear")
|
|
9430
|
-
}
|
|
9431
|
-
)
|
|
9432
|
-
] }) })
|
|
9433
|
-
] }) });
|
|
9306
|
+
),
|
|
9307
|
+
children: [
|
|
9308
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9309
|
+
_optionalChain([date, 'optionalAccess', _260 => _260.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9310
|
+
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9311
|
+
" - ",
|
|
9312
|
+
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
9313
|
+
] }) : _datefns.format.call(void 0, date.from, "LLL dd, y") : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("ui.labels.pick_a_date") })
|
|
9314
|
+
]
|
|
9315
|
+
}
|
|
9316
|
+
),
|
|
9317
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2 p-2", children: [
|
|
9318
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9319
|
+
Calendar,
|
|
9320
|
+
{
|
|
9321
|
+
mode: "range",
|
|
9322
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _261 => _261.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
9323
|
+
selected: date,
|
|
9324
|
+
onSelect: handleSelect,
|
|
9325
|
+
numberOfMonths: 2
|
|
9326
|
+
}
|
|
9327
|
+
),
|
|
9328
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9329
|
+
Button,
|
|
9330
|
+
{
|
|
9331
|
+
variant: "secondary",
|
|
9332
|
+
type: "button",
|
|
9333
|
+
onClick: () => {
|
|
9334
|
+
setDate(void 0);
|
|
9335
|
+
setPrevRange(void 0);
|
|
9336
|
+
onDateChange(void 0);
|
|
9337
|
+
setOpen(false);
|
|
9338
|
+
},
|
|
9339
|
+
className: "cursor-pointer",
|
|
9340
|
+
disabled: !date,
|
|
9341
|
+
children: t("ui.buttons.clear")
|
|
9342
|
+
}
|
|
9343
|
+
)
|
|
9344
|
+
] }) })
|
|
9345
|
+
] }) });
|
|
9346
|
+
}
|
|
9347
|
+
_chunk7QVYU63Ejs.__name.call(void 0, DateRangeSelector, "DateRangeSelector");
|
|
9348
|
+
|
|
9349
|
+
// src/components/forms/EditorSheet.tsx
|
|
9350
|
+
|
|
9351
|
+
|
|
9352
|
+
|
|
9353
|
+
|
|
9354
|
+
// src/components/forms/useEditorDialog.ts
|
|
9355
|
+
|
|
9356
|
+
function useEditorDialog(isFormDirty, options) {
|
|
9357
|
+
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
9358
|
+
const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
|
|
9359
|
+
const syncingFromProp = _react.useRef.call(void 0, false);
|
|
9360
|
+
_react.useEffect.call(void 0, () => {
|
|
9361
|
+
if (_optionalChain([options, 'optionalAccess', _262 => _262.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
|
|
9362
|
+
syncingFromProp.current = true;
|
|
9363
|
+
setOpen(options.dialogOpen);
|
|
9364
|
+
}
|
|
9365
|
+
}, [_optionalChain([options, 'optionalAccess', _263 => _263.dialogOpen])]);
|
|
9366
|
+
_react.useEffect.call(void 0, () => {
|
|
9367
|
+
if (syncingFromProp.current) {
|
|
9368
|
+
syncingFromProp.current = false;
|
|
9369
|
+
return;
|
|
9370
|
+
}
|
|
9371
|
+
if (typeof _optionalChain([options, 'optionalAccess', _264 => _264.onDialogOpenChange]) === "function") {
|
|
9372
|
+
options.onDialogOpenChange(open);
|
|
9373
|
+
}
|
|
9374
|
+
}, [open, _optionalChain([options, 'optionalAccess', _265 => _265.onDialogOpenChange])]);
|
|
9375
|
+
_react.useEffect.call(void 0, () => {
|
|
9376
|
+
if (_optionalChain([options, 'optionalAccess', _266 => _266.forceShow])) setOpen(true);
|
|
9377
|
+
}, [_optionalChain([options, 'optionalAccess', _267 => _267.forceShow])]);
|
|
9378
|
+
_react.useEffect.call(void 0, () => {
|
|
9379
|
+
if (!open) {
|
|
9380
|
+
if (_optionalChain([options, 'optionalAccess', _268 => _268.onClose])) options.onClose();
|
|
9381
|
+
}
|
|
9382
|
+
}, [open]);
|
|
9383
|
+
const handleOpenChange = _react.useCallback.call(void 0,
|
|
9384
|
+
(nextOpen) => {
|
|
9385
|
+
if (!nextOpen && isFormDirty()) {
|
|
9386
|
+
setShowDiscardConfirm(true);
|
|
9387
|
+
return;
|
|
9388
|
+
}
|
|
9389
|
+
setOpen(nextOpen);
|
|
9390
|
+
},
|
|
9391
|
+
[isFormDirty]
|
|
9392
|
+
);
|
|
9393
|
+
_react.useEffect.call(void 0, () => {
|
|
9394
|
+
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
|
|
9395
|
+
if (event.key === "Escape" && open) {
|
|
9396
|
+
event.preventDefault();
|
|
9397
|
+
event.stopPropagation();
|
|
9398
|
+
handleOpenChange(false);
|
|
9399
|
+
}
|
|
9400
|
+
}, "handleKeyDown");
|
|
9401
|
+
if (open) {
|
|
9402
|
+
document.addEventListener("keydown", handleKeyDown, true);
|
|
9403
|
+
}
|
|
9404
|
+
return () => {
|
|
9405
|
+
document.removeEventListener("keydown", handleKeyDown, true);
|
|
9406
|
+
};
|
|
9407
|
+
}, [open, handleOpenChange]);
|
|
9408
|
+
const discardDialogProps = {
|
|
9409
|
+
open: showDiscardConfirm,
|
|
9410
|
+
onOpenChange: setShowDiscardConfirm,
|
|
9411
|
+
onDiscard: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9412
|
+
setShowDiscardConfirm(false);
|
|
9413
|
+
setOpen(false);
|
|
9414
|
+
}, "onDiscard")
|
|
9415
|
+
};
|
|
9416
|
+
return { open, setOpen, handleOpenChange, discardDialogProps };
|
|
9417
|
+
}
|
|
9418
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useEditorDialog, "useEditorDialog");
|
|
9419
|
+
|
|
9420
|
+
// src/components/forms/EditorSheet.tsx
|
|
9421
|
+
|
|
9422
|
+
var sizeClasses = {
|
|
9423
|
+
sm: "data-[side=right]:sm:max-w-2xl",
|
|
9424
|
+
md: "data-[side=right]:sm:max-w-3xl",
|
|
9425
|
+
lg: "data-[side=right]:sm:max-w-5xl",
|
|
9426
|
+
xl: "data-[side=right]:sm:max-w-7xl",
|
|
9427
|
+
"2xl": "data-[side=right]:sm:!max-w-[min(96rem,90vw)]"
|
|
9428
|
+
};
|
|
9429
|
+
function EditorSheet({
|
|
9430
|
+
form,
|
|
9431
|
+
onSubmit,
|
|
9432
|
+
onReset,
|
|
9433
|
+
isFormDirty: isFormDirtyProp,
|
|
9434
|
+
entityType,
|
|
9435
|
+
entityName,
|
|
9436
|
+
title: titleOverride,
|
|
9437
|
+
description: descriptionOverride,
|
|
9438
|
+
isEdit,
|
|
9439
|
+
module,
|
|
9440
|
+
propagateChanges,
|
|
9441
|
+
onSuccess,
|
|
9442
|
+
onRevalidate,
|
|
9443
|
+
onNavigate,
|
|
9444
|
+
onSaved,
|
|
9445
|
+
size = "xl",
|
|
9446
|
+
disabled,
|
|
9447
|
+
hideSubmit,
|
|
9448
|
+
centerButtons,
|
|
9449
|
+
trigger,
|
|
9450
|
+
forceShow,
|
|
9451
|
+
onClose,
|
|
9452
|
+
dialogOpen,
|
|
9453
|
+
onDialogOpenChange,
|
|
9454
|
+
renderFooter,
|
|
9455
|
+
actions,
|
|
9456
|
+
children
|
|
9457
|
+
}) {
|
|
9458
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
9459
|
+
const generateUrl = usePageUrlGenerator();
|
|
9460
|
+
const defaultIsFormDirty = _react.useCallback.call(void 0, () => {
|
|
9461
|
+
return Object.keys(form.formState.dirtyFields).length > 0;
|
|
9462
|
+
}, [form.formState.dirtyFields]);
|
|
9463
|
+
const { open, setOpen, handleOpenChange, discardDialogProps } = useEditorDialog(
|
|
9464
|
+
_nullishCoalesce(isFormDirtyProp, () => ( defaultIsFormDirty)),
|
|
9465
|
+
{ dialogOpen, onDialogOpenChange, forceShow }
|
|
9466
|
+
);
|
|
9467
|
+
const hasBeenOpen = _react.useRef.call(void 0, false);
|
|
9468
|
+
_react.useEffect.call(void 0, () => {
|
|
9469
|
+
if (open) {
|
|
9470
|
+
hasBeenOpen.current = true;
|
|
9471
|
+
} else if (hasBeenOpen.current) {
|
|
9472
|
+
form.reset(onReset());
|
|
9473
|
+
_optionalChain([onClose, 'optionalCall', _269 => _269()]);
|
|
9474
|
+
}
|
|
9475
|
+
}, [open]);
|
|
9476
|
+
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
9477
|
+
async (values) => {
|
|
9478
|
+
try {
|
|
9479
|
+
const result = await onSubmit(values);
|
|
9480
|
+
setOpen(false);
|
|
9481
|
+
if (result && onSaved) {
|
|
9482
|
+
onSaved(result, entityType);
|
|
9483
|
+
}
|
|
9484
|
+
if (onSuccess) {
|
|
9485
|
+
await onSuccess();
|
|
9486
|
+
} else if (result) {
|
|
9487
|
+
_optionalChain([onRevalidate, 'optionalCall', _270 => _270(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
9488
|
+
if (isEdit && propagateChanges) {
|
|
9489
|
+
propagateChanges(result);
|
|
9490
|
+
} else {
|
|
9491
|
+
_optionalChain([onNavigate, 'optionalCall', _271 => _271(generateUrl({ page: module, id: result.id }))]);
|
|
9492
|
+
}
|
|
9493
|
+
}
|
|
9494
|
+
} catch (error) {
|
|
9495
|
+
errorToast({
|
|
9496
|
+
title: isEdit ? t("generic.errors.update") : t("generic.errors.create"),
|
|
9497
|
+
error
|
|
9498
|
+
});
|
|
9499
|
+
}
|
|
9500
|
+
},
|
|
9501
|
+
[onSubmit, setOpen, onSuccess, onSaved, onRevalidate, onNavigate, generateUrl, module, isEdit, propagateChanges, t]
|
|
9502
|
+
);
|
|
9503
|
+
const headerTitle = _nullishCoalesce(titleOverride, () => ( (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType }))));
|
|
9504
|
+
const headerDescription = _nullishCoalesce(descriptionOverride, () => ( (isEdit ? t("common.edit.update.description", { type: entityType, name: _nullishCoalesce(entityName, () => ( "")) }) : t("common.edit.create.description", { type: entityType }))));
|
|
9505
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9506
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Sheet, { open, onOpenChange: handleOpenChange, children: [
|
|
9507
|
+
dialogOpen === void 0 && forceShow === void 0 && (trigger ? (
|
|
9508
|
+
// Base UI: the trigger renders its own <button>. Pass the caller's
|
|
9509
|
+
// element via `render` (NOT as children) so it BECOMES the trigger
|
|
9510
|
+
// button — otherwise an interactive trigger (e.g. <Button>) nests a
|
|
9511
|
+
// <button> inside SheetTrigger's <button> (invalid HTML / hydration
|
|
9512
|
+
// error). `render` also preserves the element's native `disabled`.
|
|
9513
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTrigger, { render: trigger })
|
|
9514
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTrigger, { children: isEdit ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9515
|
+
Button,
|
|
9516
|
+
{
|
|
9517
|
+
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
|
|
9518
|
+
nativeButton: false,
|
|
9519
|
+
size: "sm",
|
|
9520
|
+
variant: "ghost",
|
|
9521
|
+
className: "text-muted-foreground",
|
|
9522
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {})
|
|
9523
|
+
}
|
|
9524
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("ui.buttons.create") }) })),
|
|
9525
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetContent, { side: "right", className: sizeClasses[size], children: [
|
|
9526
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetHeader, { className: "border-b px-6 py-4", children: actions ? (
|
|
9527
|
+
// pr-10 clears the SheetContent close button (absolute top-4 right-4).
|
|
9528
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start justify-between gap-x-4 pr-10", children: [
|
|
9529
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-y-1.5", children: [
|
|
9530
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: headerTitle }),
|
|
9531
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: headerDescription })
|
|
9532
|
+
] }),
|
|
9533
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex shrink-0 items-center gap-x-2", children: actions })
|
|
9534
|
+
] })
|
|
9535
|
+
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9536
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: headerTitle }),
|
|
9537
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: headerDescription })
|
|
9538
|
+
] }) }),
|
|
9539
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9540
|
+
"form",
|
|
9541
|
+
{
|
|
9542
|
+
onSubmit: (e) => {
|
|
9543
|
+
e.stopPropagation();
|
|
9544
|
+
return form.handleSubmit(wrappedOnSubmit)(e);
|
|
9545
|
+
},
|
|
9546
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
9547
|
+
children: [
|
|
9548
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
|
|
9549
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: renderFooter ? renderFooter({ form, isEdit, setOpen: handleOpenChange, closeWithoutConfirm: setOpen }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9550
|
+
CommonEditorButtons,
|
|
9551
|
+
{
|
|
9552
|
+
form,
|
|
9553
|
+
setOpen: handleOpenChange,
|
|
9554
|
+
isEdit,
|
|
9555
|
+
disabled,
|
|
9556
|
+
hideSubmit,
|
|
9557
|
+
centerButtons
|
|
9558
|
+
}
|
|
9559
|
+
) })
|
|
9560
|
+
]
|
|
9561
|
+
}
|
|
9562
|
+
) })
|
|
9563
|
+
] })
|
|
9564
|
+
] }),
|
|
9565
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorDiscardDialog, { ...discardDialogProps })
|
|
9566
|
+
] });
|
|
9567
|
+
}
|
|
9568
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EditorSheet, "EditorSheet");
|
|
9569
|
+
|
|
9570
|
+
// src/components/forms/EntitySelector.tsx
|
|
9571
|
+
|
|
9572
|
+
|
|
9573
|
+
|
|
9574
|
+
function EntitySelector({
|
|
9575
|
+
id,
|
|
9576
|
+
form,
|
|
9577
|
+
module,
|
|
9578
|
+
retriever,
|
|
9579
|
+
retrieverParams,
|
|
9580
|
+
ready = true,
|
|
9581
|
+
getLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (entity) => entity.name, "getLabel"),
|
|
9582
|
+
label,
|
|
9583
|
+
placeholder = "Search...",
|
|
9584
|
+
emptyText,
|
|
9585
|
+
isRequired = false,
|
|
9586
|
+
disabled = false,
|
|
9587
|
+
description,
|
|
9588
|
+
onChange,
|
|
9589
|
+
onCreateNew,
|
|
9590
|
+
createNewLabel,
|
|
9591
|
+
toFormValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (entity) => ({ id: entity.id, name: entity.name }), "toFormValue"),
|
|
9592
|
+
getSelectedItemDisplay,
|
|
9593
|
+
renderOption,
|
|
9594
|
+
filterData,
|
|
9595
|
+
renderAfter,
|
|
9596
|
+
autoSelectSingle = false,
|
|
9597
|
+
useFormWatch: shouldUseFormWatch = false
|
|
9598
|
+
}) {
|
|
9599
|
+
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
9600
|
+
const searchTermRef = _react.useRef.call(void 0, "");
|
|
9601
|
+
const [searchTerm, setSearchTerm] = _react.useState.call(void 0, "");
|
|
9602
|
+
const [isSearching, setIsSearching] = _react.useState.call(void 0, false);
|
|
9603
|
+
const [isCreating, setIsCreating] = _react.useState.call(void 0, false);
|
|
9604
|
+
const [selectedEntity, setSelectedEntity] = _react.useState.call(void 0, void 0);
|
|
9605
|
+
const watchedValue = shouldUseFormWatch ? form.watch(id) : void 0;
|
|
9606
|
+
const data = useDataListRetriever({
|
|
9607
|
+
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => retriever(params), "retriever"),
|
|
9608
|
+
retrieverParams: _nullishCoalesce(retrieverParams, () => ( {})),
|
|
9609
|
+
ready,
|
|
9610
|
+
module
|
|
9611
|
+
});
|
|
9612
|
+
_react.useEffect.call(void 0, () => {
|
|
9613
|
+
if (ready) data.setReady(true);
|
|
9614
|
+
}, [ready]);
|
|
9615
|
+
const search = _react.useCallback.call(void 0,
|
|
9616
|
+
async (searchedTerm) => {
|
|
9617
|
+
try {
|
|
9618
|
+
if (searchedTerm === searchTermRef.current) return;
|
|
9619
|
+
setIsSearching(true);
|
|
9620
|
+
searchTermRef.current = searchedTerm;
|
|
9621
|
+
await data.search(searchedTerm);
|
|
9622
|
+
} finally {
|
|
9623
|
+
setIsSearching(false);
|
|
9624
|
+
}
|
|
9625
|
+
},
|
|
9626
|
+
[searchTermRef, data]
|
|
9627
|
+
);
|
|
9628
|
+
const updateSearchTerm = useDebounce2(search, 500);
|
|
9629
|
+
_react.useEffect.call(void 0, () => {
|
|
9630
|
+
setIsSearching(true);
|
|
9631
|
+
updateSearchTerm(searchTerm);
|
|
9632
|
+
}, [updateSearchTerm, searchTerm]);
|
|
9633
|
+
_react.useEffect.call(void 0, () => {
|
|
9634
|
+
if (autoSelectSingle && data.isLoaded && data.data && data.data.length === 1 && searchTerm === "" && !form.getValues(id)) {
|
|
9635
|
+
const entity = data.data[0];
|
|
9636
|
+
form.setValue(id, toFormValue(entity));
|
|
9637
|
+
setSelectedEntity(entity);
|
|
9638
|
+
}
|
|
9639
|
+
}, [data.isLoaded, data.data, searchTerm, form, id, autoSelectSingle, toFormValue]);
|
|
9640
|
+
const handleSelect = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (entity) => {
|
|
9641
|
+
setSelectedEntity(entity);
|
|
9642
|
+
if (onChange) onChange(entity);
|
|
9643
|
+
if (!entity) {
|
|
9644
|
+
form.setValue(id, void 0);
|
|
9645
|
+
setOpen(false);
|
|
9646
|
+
return;
|
|
9647
|
+
}
|
|
9648
|
+
form.setValue(id, toFormValue(entity));
|
|
9649
|
+
setOpen(false);
|
|
9650
|
+
setTimeout(() => setOpen(false), 0);
|
|
9651
|
+
}, "handleSelect");
|
|
9652
|
+
const handleCreateNew = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
9653
|
+
if (!onCreateNew) return;
|
|
9654
|
+
const trimmed = searchTerm.trim();
|
|
9655
|
+
if (!trimmed || isCreating) return;
|
|
9656
|
+
setIsCreating(true);
|
|
9657
|
+
try {
|
|
9658
|
+
const created = await onCreateNew(trimmed);
|
|
9659
|
+
if (created) {
|
|
9660
|
+
handleSelect(created);
|
|
9661
|
+
setSearchTerm("");
|
|
9662
|
+
searchTermRef.current = "";
|
|
9663
|
+
}
|
|
9664
|
+
} finally {
|
|
9665
|
+
setIsCreating(false);
|
|
9666
|
+
}
|
|
9667
|
+
}, "handleCreateNew");
|
|
9668
|
+
const displayData = filterData ? filterData(_nullishCoalesce(data.data, () => ( []))) : _nullishCoalesce(data.data, () => ( []));
|
|
9669
|
+
const hasValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value) => {
|
|
9670
|
+
if (value == null) return false;
|
|
9671
|
+
if (typeof value === "object") return !!value.id;
|
|
9672
|
+
return !!value;
|
|
9673
|
+
}, "hasValue");
|
|
9674
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
9675
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, description, children: (field) => {
|
|
9676
|
+
const effectiveValue = shouldUseFormWatch ? watchedValue : field.value;
|
|
9677
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open: disabled ? false : open, onOpenChange: disabled ? void 0 : setOpen, modal: true, children: [
|
|
9678
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", disabled, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9679
|
+
"div",
|
|
9680
|
+
{
|
|
9681
|
+
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 w-full items-center gap-2 rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed ${hasValue(effectiveValue) ? "" : "text-muted-foreground"} ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
|
|
9682
|
+
children: [
|
|
9683
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-left", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _272 => _272.name]), () => ( "")) : placeholder }),
|
|
9684
|
+
hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9685
|
+
_lucidereact.CircleX,
|
|
9686
|
+
{
|
|
9687
|
+
className: "text-muted hover:text-destructive ml-auto h-4 w-4 shrink-0 cursor-pointer",
|
|
9688
|
+
onClick: (e) => {
|
|
9689
|
+
e.stopPropagation();
|
|
9690
|
+
e.preventDefault();
|
|
9691
|
+
handleSelect();
|
|
9692
|
+
}
|
|
9693
|
+
}
|
|
9694
|
+
)
|
|
9695
|
+
]
|
|
9696
|
+
}
|
|
9697
|
+
) }),
|
|
9698
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { align: "start", className: "w-(--anchor-width) pointer-events-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Command, { shouldFilter: false, children: [
|
|
9699
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative mb-2 w-full", children: [
|
|
9700
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, { className: "text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" }),
|
|
9701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9702
|
+
Input,
|
|
9703
|
+
{
|
|
9704
|
+
placeholder,
|
|
9705
|
+
type: "text",
|
|
9706
|
+
className: "w-full pr-8 pl-8",
|
|
9707
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
9708
|
+
value: searchTerm
|
|
9709
|
+
}
|
|
9710
|
+
),
|
|
9711
|
+
isSearching ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCwIcon, { className: "text-muted-foreground absolute top-2.5 right-2.5 h-4 w-4 animate-spin" }) : searchTermRef.current ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9712
|
+
_lucidereact.XIcon,
|
|
9713
|
+
{
|
|
9714
|
+
className: "absolute top-2.5 right-2.5 h-4 w-4 cursor-pointer",
|
|
9715
|
+
onClick: () => {
|
|
9716
|
+
setSearchTerm("");
|
|
9717
|
+
search("");
|
|
9718
|
+
}
|
|
9719
|
+
}
|
|
9720
|
+
) : null
|
|
9721
|
+
] }),
|
|
9722
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandList, { children: [
|
|
9723
|
+
onCreateNew && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9724
|
+
CommandItem,
|
|
9725
|
+
{
|
|
9726
|
+
value: "__create_new__",
|
|
9727
|
+
className: `cursor-pointer ${!searchTerm.trim() || isCreating ? "opacity-50 pointer-events-none" : ""}`,
|
|
9728
|
+
disabled: !searchTerm.trim() || isCreating,
|
|
9729
|
+
onSelect: handleCreateNew,
|
|
9730
|
+
children: [
|
|
9731
|
+
isCreating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCwIcon, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Plus, { className: "mr-2 h-4 w-4" }),
|
|
9732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: createNewLabel ? createNewLabel(searchTerm) : searchTerm.trim() || "" })
|
|
9733
|
+
]
|
|
9734
|
+
},
|
|
9735
|
+
"__create_new__"
|
|
9736
|
+
),
|
|
9737
|
+
renderOption ? displayData.map((entity) => renderOption(entity, () => handleSelect(entity))) : displayData.map((entity) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9738
|
+
CommandItem,
|
|
9739
|
+
{
|
|
9740
|
+
className: "cursor-pointer bg-transparent data-selected:bg-transparent hover:bg-muted data-selected:hover:bg-muted",
|
|
9741
|
+
value: entity.id,
|
|
9742
|
+
onSelect: () => handleSelect(entity),
|
|
9743
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: getLabel(entity) })
|
|
9744
|
+
},
|
|
9745
|
+
entity.id
|
|
9746
|
+
)),
|
|
9747
|
+
emptyText && displayData.length === 0 && !onCreateNew && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground py-6 text-center text-xs", children: emptyText })
|
|
9748
|
+
] })
|
|
9749
|
+
] }) })
|
|
9750
|
+
] });
|
|
9751
|
+
} }),
|
|
9752
|
+
renderAfter && renderAfter({ form, selectedEntity })
|
|
9753
|
+
] });
|
|
9434
9754
|
}
|
|
9435
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
9755
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntitySelector, "EntitySelector");
|
|
9436
9756
|
|
|
9437
9757
|
// src/components/forms/FileUploader.tsx
|
|
9438
9758
|
|
|
@@ -9495,7 +9815,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9495
9815
|
movePrev();
|
|
9496
9816
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
9497
9817
|
if (activeIndex === -1) {
|
|
9498
|
-
_optionalChain([dropzoneState, 'access',
|
|
9818
|
+
_optionalChain([dropzoneState, 'access', _273 => _273.inputRef, 'access', _274 => _274.current, 'optionalAccess', _275 => _275.click, 'call', _276 => _276()]);
|
|
9499
9819
|
}
|
|
9500
9820
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
9501
9821
|
if (activeIndex !== -1) {
|
|
@@ -9533,13 +9853,13 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9533
9853
|
onValueChange(newValues);
|
|
9534
9854
|
if (rejectedFiles.length > 0) {
|
|
9535
9855
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
9536
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9856
|
+
if (_optionalChain([rejectedFiles, 'access', _277 => _277[i], 'access', _278 => _278.errors, 'access', _279 => _279[0], 'optionalAccess', _280 => _280.code]) === "file-too-large") {
|
|
9537
9857
|
_chunkPQBKPWBYjs.showError.call(void 0, t("common.errors.file"), {
|
|
9538
9858
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
9539
9859
|
});
|
|
9540
9860
|
break;
|
|
9541
9861
|
}
|
|
9542
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9862
|
+
if (_optionalChain([rejectedFiles, 'access', _281 => _281[i], 'access', _282 => _282.errors, 'access', _283 => _283[0], 'optionalAccess', _284 => _284.message])) {
|
|
9543
9863
|
_chunkPQBKPWBYjs.showError.call(void 0, t(`common.errors.file`), {
|
|
9544
9864
|
description: rejectedFiles[i].errors[0].message
|
|
9545
9865
|
});
|
|
@@ -9729,108 +10049,6 @@ var FileInput = _react.forwardRef.call(void 0,
|
|
|
9729
10049
|
);
|
|
9730
10050
|
FileInput.displayName = "FileInput";
|
|
9731
10051
|
|
|
9732
|
-
// src/components/forms/CurrencyInput.tsx
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
function centsToInput(cents) {
|
|
9736
|
-
return (cents / 100).toFixed(2);
|
|
9737
|
-
}
|
|
9738
|
-
_chunk7QVYU63Ejs.__name.call(void 0, centsToInput, "centsToInput");
|
|
9739
|
-
function parseInput(raw) {
|
|
9740
|
-
if (!raw || raw.trim() === "") return 0;
|
|
9741
|
-
const trimmed = raw.trim();
|
|
9742
|
-
const lastComma = trimmed.lastIndexOf(",");
|
|
9743
|
-
const lastDot = trimmed.lastIndexOf(".");
|
|
9744
|
-
let normalized;
|
|
9745
|
-
if (lastComma > lastDot) {
|
|
9746
|
-
normalized = trimmed.replace(/\./g, "").replace(",", ".");
|
|
9747
|
-
} else if (lastDot > lastComma) {
|
|
9748
|
-
normalized = trimmed.replace(/,/g, "");
|
|
9749
|
-
} else {
|
|
9750
|
-
normalized = trimmed.replace(",", ".");
|
|
9751
|
-
}
|
|
9752
|
-
const parsed = parseFloat(normalized);
|
|
9753
|
-
if (Number.isNaN(parsed)) return 0;
|
|
9754
|
-
return Math.round(parsed * 100);
|
|
9755
|
-
}
|
|
9756
|
-
_chunk7QVYU63Ejs.__name.call(void 0, parseInput, "parseInput");
|
|
9757
|
-
function sanitizeKeystroke(raw) {
|
|
9758
|
-
let value = raw.replace(/[^0-9.,-]/g, "");
|
|
9759
|
-
const firstSep = value.search(/[.,]/);
|
|
9760
|
-
if (firstSep !== -1) {
|
|
9761
|
-
const sep = value[firstSep];
|
|
9762
|
-
const before = value.slice(0, firstSep);
|
|
9763
|
-
const after = value.slice(firstSep + 1).replace(/[.,]/g, "");
|
|
9764
|
-
value = before + sep + after;
|
|
9765
|
-
}
|
|
9766
|
-
return value;
|
|
9767
|
-
}
|
|
9768
|
-
_chunk7QVYU63Ejs.__name.call(void 0, sanitizeKeystroke, "sanitizeKeystroke");
|
|
9769
|
-
function CurrencyInput({
|
|
9770
|
-
valueCents,
|
|
9771
|
-
onChange,
|
|
9772
|
-
currencySymbol = "\u20AC",
|
|
9773
|
-
readOnly,
|
|
9774
|
-
disabled,
|
|
9775
|
-
placeholder,
|
|
9776
|
-
className,
|
|
9777
|
-
testId
|
|
9778
|
-
}) {
|
|
9779
|
-
const [draft, setDraft] = _react.useState.call(void 0, null);
|
|
9780
|
-
const display = draft !== null ? draft : centsToInput(valueCents);
|
|
9781
|
-
const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
9782
|
-
setDraft(sanitizeKeystroke(e.target.value));
|
|
9783
|
-
}, "handleChange");
|
|
9784
|
-
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9785
|
-
if (draft === null) return;
|
|
9786
|
-
onChange(parseInput(draft));
|
|
9787
|
-
setDraft(null);
|
|
9788
|
-
}, "handleBlur");
|
|
9789
|
-
const sharedProps = {
|
|
9790
|
-
type: "text",
|
|
9791
|
-
inputMode: "decimal",
|
|
9792
|
-
value: display,
|
|
9793
|
-
readOnly,
|
|
9794
|
-
disabled,
|
|
9795
|
-
placeholder,
|
|
9796
|
-
onChange: handleChange,
|
|
9797
|
-
onBlur: handleBlur,
|
|
9798
|
-
"data-testid": testId
|
|
9799
|
-
};
|
|
9800
|
-
if (!currencySymbol) {
|
|
9801
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Input, { ...sharedProps, className: `text-end ${_nullishCoalesce(className, () => ( ""))}`.trim() });
|
|
9802
|
-
}
|
|
9803
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputGroup, { children: [
|
|
9804
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupText, { children: currencySymbol }) }),
|
|
9805
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupInput, { ...sharedProps, className: `text-end ${_nullishCoalesce(className, () => ( ""))}`.trim() })
|
|
9806
|
-
] });
|
|
9807
|
-
}
|
|
9808
|
-
_chunk7QVYU63Ejs.__name.call(void 0, CurrencyInput, "CurrencyInput");
|
|
9809
|
-
|
|
9810
|
-
// src/components/forms/FormCheckbox.tsx
|
|
9811
|
-
|
|
9812
|
-
function FormCheckbox({ form, id, name, labelBefore, description, isRequired }) {
|
|
9813
|
-
const simpleLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9814
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldLabel, { htmlFor: id, className: `font-normal ${labelBefore ? "" : "ml-3"}`, children: name });
|
|
9815
|
-
}, "simpleLabel");
|
|
9816
|
-
const label = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9817
|
-
if (!description) return simpleLabel();
|
|
9818
|
-
else
|
|
9819
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
9820
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: simpleLabel() }),
|
|
9821
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: description })
|
|
9822
|
-
] });
|
|
9823
|
-
}, "label");
|
|
9824
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, orientation: "horizontal", children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-4", children: [
|
|
9825
|
-
labelBefore && label(),
|
|
9826
|
-
labelBefore && isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-2 font-semibold", children: "*" }),
|
|
9827
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Checkbox, { id, checked: _nullishCoalesce(field.value, () => ( false)), onCheckedChange: field.onChange }),
|
|
9828
|
-
!labelBefore && label(),
|
|
9829
|
-
!labelBefore && isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-2 font-semibold", children: "*" })
|
|
9830
|
-
] }) }) });
|
|
9831
|
-
}
|
|
9832
|
-
_chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
|
|
9833
|
-
|
|
9834
10052
|
// src/components/forms/FormBlockNote.tsx
|
|
9835
10053
|
|
|
9836
10054
|
|
|
@@ -9838,7 +10056,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
|
|
|
9838
10056
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
9839
10057
|
|
|
9840
10058
|
|
|
9841
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
10059
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-PFA6IAEL.js"))), {
|
|
9842
10060
|
ssr: false
|
|
9843
10061
|
});
|
|
9844
10062
|
var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -9903,7 +10121,7 @@ function FormBlockNote({
|
|
|
9903
10121
|
onChange: (content, isEmpty) => {
|
|
9904
10122
|
lastEditorContentRef.current = content;
|
|
9905
10123
|
field.onChange(content);
|
|
9906
|
-
_optionalChain([onEmptyChange, 'optionalCall',
|
|
10124
|
+
_optionalChain([onEmptyChange, 'optionalCall', _285 => _285(isEmpty)]);
|
|
9907
10125
|
},
|
|
9908
10126
|
placeholder,
|
|
9909
10127
|
bordered: true,
|
|
@@ -9929,6 +10147,30 @@ function FormBlockNote({
|
|
|
9929
10147
|
}
|
|
9930
10148
|
_chunk7QVYU63Ejs.__name.call(void 0, FormBlockNote, "FormBlockNote");
|
|
9931
10149
|
|
|
10150
|
+
// src/components/forms/FormCheckbox.tsx
|
|
10151
|
+
|
|
10152
|
+
function FormCheckbox({ form, id, name, labelBefore, description, isRequired }) {
|
|
10153
|
+
const simpleLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10154
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldLabel, { htmlFor: id, className: `font-normal ${labelBefore ? "" : "ml-3"}`, children: name });
|
|
10155
|
+
}, "simpleLabel");
|
|
10156
|
+
const label = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10157
|
+
if (!description) return simpleLabel();
|
|
10158
|
+
else
|
|
10159
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
10160
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: simpleLabel() }),
|
|
10161
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: description })
|
|
10162
|
+
] });
|
|
10163
|
+
}, "label");
|
|
10164
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, orientation: "horizontal", children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-4", children: [
|
|
10165
|
+
labelBefore && label(),
|
|
10166
|
+
labelBefore && isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-2 font-semibold", children: "*" }),
|
|
10167
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Checkbox, { id, checked: _nullishCoalesce(field.value, () => ( false)), onCheckedChange: field.onChange }),
|
|
10168
|
+
!labelBefore && label(),
|
|
10169
|
+
!labelBefore && isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-2 font-semibold", children: "*" })
|
|
10170
|
+
] }) }) });
|
|
10171
|
+
}
|
|
10172
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
|
|
10173
|
+
|
|
9932
10174
|
// src/components/forms/FormDate.tsx
|
|
9933
10175
|
|
|
9934
10176
|
|
|
@@ -10362,6 +10604,47 @@ function FormInput({
|
|
|
10362
10604
|
}
|
|
10363
10605
|
_chunk7QVYU63Ejs.__name.call(void 0, FormInput, "FormInput");
|
|
10364
10606
|
|
|
10607
|
+
// src/components/forms/FormLayout.tsx
|
|
10608
|
+
|
|
10609
|
+
function FormBody({ children, className }) {
|
|
10610
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "flex w-full flex-col gap-4", className), children });
|
|
10611
|
+
}
|
|
10612
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormBody, "FormBody");
|
|
10613
|
+
function FormSection({
|
|
10614
|
+
title,
|
|
10615
|
+
children,
|
|
10616
|
+
className
|
|
10617
|
+
}) {
|
|
10618
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: _chunkPQBKPWBYjs.cn.call(void 0, "flex flex-col gap-4 pt-4 first:pt-0", className), children: [
|
|
10619
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-lg font-semibold", children: title }),
|
|
10620
|
+
children
|
|
10621
|
+
] });
|
|
10622
|
+
}
|
|
10623
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormSection, "FormSection");
|
|
10624
|
+
function FormRow({
|
|
10625
|
+
children,
|
|
10626
|
+
columns = 2,
|
|
10627
|
+
className
|
|
10628
|
+
}) {
|
|
10629
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10630
|
+
"div",
|
|
10631
|
+
{
|
|
10632
|
+
className: _chunkPQBKPWBYjs.cn.call(void 0, "grid grid-cols-1 gap-x-4 gap-y-4", columns === 3 ? "md:grid-cols-3" : "md:grid-cols-2", className),
|
|
10633
|
+
children
|
|
10634
|
+
}
|
|
10635
|
+
);
|
|
10636
|
+
}
|
|
10637
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormRow, "FormRow");
|
|
10638
|
+
function FormCol({
|
|
10639
|
+
children,
|
|
10640
|
+
span = 1,
|
|
10641
|
+
className
|
|
10642
|
+
}) {
|
|
10643
|
+
const spanClass = span === 3 ? "md:col-span-3" : span === 2 ? "md:col-span-2" : "";
|
|
10644
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, spanClass, className), children });
|
|
10645
|
+
}
|
|
10646
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormCol, "FormCol");
|
|
10647
|
+
|
|
10365
10648
|
// src/components/forms/PasswordInput.tsx
|
|
10366
10649
|
|
|
10367
10650
|
|
|
@@ -10502,11 +10785,11 @@ function FormPlaceAutocomplete({
|
|
|
10502
10785
|
const data = await response.json();
|
|
10503
10786
|
if (data.suggestions) {
|
|
10504
10787
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
10505
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
10506
|
-
description: _optionalChain([suggestion, 'access',
|
|
10788
|
+
place_id: _optionalChain([suggestion, 'access', _286 => _286.placePrediction, 'optionalAccess', _287 => _287.placeId]) || "",
|
|
10789
|
+
description: _optionalChain([suggestion, 'access', _288 => _288.placePrediction, 'optionalAccess', _289 => _289.text, 'optionalAccess', _290 => _290.text]) || "",
|
|
10507
10790
|
structured_formatting: {
|
|
10508
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
10509
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
10791
|
+
main_text: _optionalChain([suggestion, 'access', _291 => _291.placePrediction, 'optionalAccess', _292 => _292.structuredFormat, 'optionalAccess', _293 => _293.mainText, 'optionalAccess', _294 => _294.text]) || "",
|
|
10792
|
+
secondary_text: _optionalChain([suggestion, 'access', _295 => _295.placePrediction, 'optionalAccess', _296 => _296.structuredFormat, 'optionalAccess', _297 => _297.secondaryText, 'optionalAccess', _298 => _298.text]) || ""
|
|
10510
10793
|
}
|
|
10511
10794
|
}));
|
|
10512
10795
|
setSuggestions(formattedSuggestions);
|
|
@@ -10653,8 +10936,8 @@ function FormPlaceAutocomplete({
|
|
|
10653
10936
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
10654
10937
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
10655
10938
|
children: [
|
|
10656
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
10657
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
10939
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _299 => _299.structured_formatting, 'optionalAccess', _300 => _300.main_text]) }),
|
|
10940
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _301 => _301.structured_formatting, 'optionalAccess', _302 => _302.secondary_text]) })
|
|
10658
10941
|
]
|
|
10659
10942
|
},
|
|
10660
10943
|
suggestion.place_id || index
|
|
@@ -10702,7 +10985,7 @@ function FormSelect({
|
|
|
10702
10985
|
disabled,
|
|
10703
10986
|
"data-testid": testId,
|
|
10704
10987
|
children: [
|
|
10705
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access',
|
|
10988
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _303 => _303.find, 'call', _304 => _304((v) => v.id === field.value), 'optionalAccess', _305 => _305.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
|
|
10706
10989
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
|
|
10707
10990
|
allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
|
|
10708
10991
|
values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
|
|
@@ -10839,41 +11122,6 @@ var dropzone = {
|
|
|
10839
11122
|
}
|
|
10840
11123
|
};
|
|
10841
11124
|
|
|
10842
|
-
// src/features/feature/components/forms/FormFeatures.tsx
|
|
10843
|
-
|
|
10844
|
-
function FormFeatures({ form, name, features, featureField = "featureIds" }) {
|
|
10845
|
-
const selectedFeatures = form.watch(featureField);
|
|
10846
|
-
const toggleFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature, checked) => {
|
|
10847
|
-
let newFeatureIds = [...selectedFeatures];
|
|
10848
|
-
if (checked) {
|
|
10849
|
-
if (!newFeatureIds.includes(feature.id)) {
|
|
10850
|
-
newFeatureIds.push(feature.id);
|
|
10851
|
-
}
|
|
10852
|
-
} else {
|
|
10853
|
-
newFeatureIds = newFeatureIds.filter((id) => id !== feature.id);
|
|
10854
|
-
}
|
|
10855
|
-
form.setValue(featureField, newFeatureIds);
|
|
10856
|
-
}, "toggleFeature");
|
|
10857
|
-
const isFeatureChecked = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature) => selectedFeatures.includes(feature.id), "isFeatureChecked");
|
|
10858
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
10859
|
-
name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-4 border-b text-lg font-semibold", children: name }),
|
|
10860
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-[40vh]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-2 pr-4", children: features.filter((feature) => !feature.isCore).map((feature) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center", children: [
|
|
10861
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10862
|
-
Checkbox,
|
|
10863
|
-
{
|
|
10864
|
-
id: feature.id,
|
|
10865
|
-
checked: isFeatureChecked(feature),
|
|
10866
|
-
onCheckedChange: (val) => {
|
|
10867
|
-
toggleFeature(feature, val === true);
|
|
10868
|
-
}
|
|
10869
|
-
}
|
|
10870
|
-
),
|
|
10871
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: feature.id, className: "ml-3 cursor-pointer font-normal", children: feature.name })
|
|
10872
|
-
] }, feature.id)) }) })
|
|
10873
|
-
] });
|
|
10874
|
-
}
|
|
10875
|
-
_chunk7QVYU63Ejs.__name.call(void 0, FormFeatures, "FormFeatures");
|
|
10876
|
-
|
|
10877
11125
|
// src/features/user/components/widgets/UserAvatar.tsx
|
|
10878
11126
|
|
|
10879
11127
|
function UserAvatar({ user, className, showFull, showLink, showTooltip = true }) {
|
|
@@ -10889,7 +11137,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
10889
11137
|
}, "getInitials");
|
|
10890
11138
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10891
11139
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `h-6 w-6 ${className}`, children: [
|
|
10892
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
11140
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _306 => _306.avatar]) }),
|
|
10893
11141
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
|
|
10894
11142
|
] }) });
|
|
10895
11143
|
}, "getAvatar");
|
|
@@ -11080,7 +11328,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11080
11328
|
})
|
|
11081
11329
|
};
|
|
11082
11330
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11083
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
11331
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _307 => _307[field], 'optionalCall', _308 => _308()])).filter((col) => col !== void 0);
|
|
11084
11332
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
11085
11333
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11086
11334
|
}, "useUserTableStructure");
|
|
@@ -11194,10 +11442,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
11194
11442
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
11195
11443
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: [
|
|
11196
11444
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-4 w-4`, children: [
|
|
11197
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access',
|
|
11198
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access',
|
|
11445
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _309 => _309.value, 'optionalAccess', _310 => _310.avatar]) }),
|
|
11446
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _311 => _311.value, 'optionalAccess', _312 => _312.name]) ? _optionalChain([field, 'access', _313 => _313.value, 'optionalAccess', _314 => _314.name, 'access', _315 => _315.split, 'call', _316 => _316(" "), 'access', _317 => _317.map, 'call', _318 => _318((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
11199
11447
|
] }) }),
|
|
11200
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
11448
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _319 => _319.value, 'optionalAccess', _320 => _320.name]), () => ( "")) })
|
|
11201
11449
|
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
|
|
11202
11450
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11203
11451
|
_lucidereact.CircleX,
|
|
@@ -11528,7 +11776,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
|
11528
11776
|
const data = useDataListRetriever({
|
|
11529
11777
|
ready: !!company,
|
|
11530
11778
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params), "retriever"),
|
|
11531
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
11779
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _321 => _321.id]), isDeleted },
|
|
11532
11780
|
module: _chunkPQBKPWBYjs.Modules.User
|
|
11533
11781
|
});
|
|
11534
11782
|
_react.useEffect.call(void 0, () => {
|
|
@@ -11635,11 +11883,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
11635
11883
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
11636
11884
|
onClick: (_e) => {
|
|
11637
11885
|
setSelectedUser(user);
|
|
11638
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11886
|
+
_optionalChain([setLevelOpen, 'optionalCall', _322 => _322(true)]);
|
|
11639
11887
|
},
|
|
11640
11888
|
onSelect: (_e) => {
|
|
11641
11889
|
setSelectedUser(user);
|
|
11642
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11890
|
+
_optionalChain([setLevelOpen, 'optionalCall', _323 => _323(true)]);
|
|
11643
11891
|
},
|
|
11644
11892
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
11645
11893
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -11770,7 +12018,7 @@ function CompanyContent({ company, actions }) {
|
|
|
11770
12018
|
company.legal_address
|
|
11771
12019
|
] }),
|
|
11772
12020
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
|
|
11773
|
-
_optionalChain([company, 'access',
|
|
12021
|
+
_optionalChain([company, 'access', _324 => _324.configurations, 'optionalAccess', _325 => _325.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
11774
12022
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
11775
12023
|
t("features.configuration.country"),
|
|
11776
12024
|
":"
|
|
@@ -11778,7 +12026,7 @@ function CompanyContent({ company, actions }) {
|
|
|
11778
12026
|
" ",
|
|
11779
12027
|
company.configurations.country
|
|
11780
12028
|
] }),
|
|
11781
|
-
_optionalChain([company, 'access',
|
|
12029
|
+
_optionalChain([company, 'access', _326 => _326.configurations, 'optionalAccess', _327 => _327.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
11782
12030
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
11783
12031
|
t("features.configuration.currency"),
|
|
11784
12032
|
":"
|
|
@@ -12188,7 +12436,7 @@ function CompanyEditorInternal({
|
|
|
12188
12436
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
12189
12437
|
const fiscalRef = _react.useRef.call(void 0, null);
|
|
12190
12438
|
const addressComponentsRef = _react.useRef.call(void 0, {});
|
|
12191
|
-
const canAccessFeatures = hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
12439
|
+
const canAccessFeatures = hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _328 => _328.env, 'access', _329 => _329.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _330 => _330.toLowerCase, 'call', _331 => _331()]) === "true";
|
|
12192
12440
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
12193
12441
|
(open) => {
|
|
12194
12442
|
if (open && features.length === 0 && canAccessFeatures) {
|
|
@@ -12203,7 +12451,7 @@ function CompanyEditorInternal({
|
|
|
12203
12451
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
12204
12452
|
fetchFeatures();
|
|
12205
12453
|
}
|
|
12206
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
12454
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _332 => _332(open)]);
|
|
12207
12455
|
},
|
|
12208
12456
|
[features.length, canAccessFeatures, hasRole, onDialogOpenChange]
|
|
12209
12457
|
);
|
|
@@ -12248,12 +12496,12 @@ function CompanyEditorInternal({
|
|
|
12248
12496
|
);
|
|
12249
12497
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
12250
12498
|
return {
|
|
12251
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
12252
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
12253
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
12254
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
12255
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
12256
|
-
legal_address: _optionalChain([company, 'optionalAccess',
|
|
12499
|
+
id: _optionalChain([company, 'optionalAccess', _333 => _333.id]) || _uuid.v4.call(void 0, ),
|
|
12500
|
+
name: _optionalChain([company, 'optionalAccess', _334 => _334.name]) || "",
|
|
12501
|
+
featureIds: _optionalChain([company, 'optionalAccess', _335 => _335.features, 'access', _336 => _336.map, 'call', _337 => _337((feature) => feature.id)]) || [],
|
|
12502
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _338 => _338.modules, 'access', _339 => _339.map, 'call', _340 => _340((module) => module.id)]) || [],
|
|
12503
|
+
logo: _optionalChain([company, 'optionalAccess', _341 => _341.logo]) || "",
|
|
12504
|
+
legal_address: _optionalChain([company, 'optionalAccess', _342 => _342.legal_address]) || ""
|
|
12257
12505
|
};
|
|
12258
12506
|
}, [company]);
|
|
12259
12507
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -12265,7 +12513,7 @@ function CompanyEditorInternal({
|
|
|
12265
12513
|
{
|
|
12266
12514
|
form,
|
|
12267
12515
|
entityType: t(`entities.companies`, { count: 1 }),
|
|
12268
|
-
entityName: _optionalChain([company, 'optionalAccess',
|
|
12516
|
+
entityName: _optionalChain([company, 'optionalAccess', _343 => _343.name]),
|
|
12269
12517
|
isEdit: !!company,
|
|
12270
12518
|
module: _chunkPQBKPWBYjs.Modules.Company,
|
|
12271
12519
|
propagateChanges,
|
|
@@ -12290,7 +12538,7 @@ function CompanyEditorInternal({
|
|
|
12290
12538
|
throw new Error("Fiscal data validation failed");
|
|
12291
12539
|
}
|
|
12292
12540
|
const payload = {
|
|
12293
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
12541
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _344 => _344.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
12294
12542
|
name: values.name,
|
|
12295
12543
|
logo: files && contentType ? values.logo : void 0,
|
|
12296
12544
|
featureIds: values.featureIds,
|
|
@@ -12321,10 +12569,10 @@ function CompanyEditorInternal({
|
|
|
12321
12569
|
dialogOpen,
|
|
12322
12570
|
onDialogOpenChange: handleDialogOpenChange,
|
|
12323
12571
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
12324
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess',
|
|
12572
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _345 => _345.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12325
12573
|
_image2.default,
|
|
12326
12574
|
{
|
|
12327
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
12575
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _346 => _346.logo]) || "",
|
|
12328
12576
|
alt: "Company Logo",
|
|
12329
12577
|
width: 200,
|
|
12330
12578
|
height: 200
|
|
@@ -12358,7 +12606,7 @@ function CompanyEditorInternal({
|
|
|
12358
12606
|
}
|
|
12359
12607
|
),
|
|
12360
12608
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mt-2 text-sm font-semibold", children: t(`company.sections.fiscal_data`) }),
|
|
12361
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess',
|
|
12609
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _347 => _347.fiscal_data])) })
|
|
12362
12610
|
] }),
|
|
12363
12611
|
canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
|
|
12364
12612
|
] })
|
|
@@ -12475,7 +12723,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
|
|
|
12475
12723
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
12476
12724
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
12477
12725
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
12478
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
12726
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _348 => _348.actor, 'optionalAccess', _349 => _349.name]), () => ( "")),
|
|
12479
12727
|
title: data.title,
|
|
12480
12728
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
12481
12729
|
}) }),
|
|
@@ -12504,7 +12752,7 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
12504
12752
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
12505
12753
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
12506
12754
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
12507
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
12755
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _350 => _350.actor, 'optionalAccess', _351 => _351.name]), () => ( "")),
|
|
12508
12756
|
title: data.title,
|
|
12509
12757
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
12510
12758
|
}) }),
|
|
@@ -12568,7 +12816,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
12568
12816
|
_react.useEffect.call(void 0, () => {
|
|
12569
12817
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
12570
12818
|
if (_chunkJO5BLONKjs.isRolesConfigured.call(void 0, )) {
|
|
12571
|
-
const isAdmin = _optionalChain([currentUser, 'access',
|
|
12819
|
+
const isAdmin = _optionalChain([currentUser, 'access', _352 => _352.roles, 'optionalAccess', _353 => _353.some, 'call', _354 => _354((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]);
|
|
12572
12820
|
if (isAdmin) {
|
|
12573
12821
|
setHasInitiallyLoaded(true);
|
|
12574
12822
|
return;
|
|
@@ -12770,7 +13018,7 @@ function OnboardingProvider({
|
|
|
12770
13018
|
let tourSteps = steps;
|
|
12771
13019
|
if (!tourSteps) {
|
|
12772
13020
|
const tour2 = tours.find((t) => t.id === tourId);
|
|
12773
|
-
tourSteps = _optionalChain([tour2, 'optionalAccess',
|
|
13021
|
+
tourSteps = _optionalChain([tour2, 'optionalAccess', _355 => _355.steps]);
|
|
12774
13022
|
}
|
|
12775
13023
|
if (!tourSteps || tourSteps.length === 0) {
|
|
12776
13024
|
console.warn(`No steps found for tour: ${tourId}`);
|
|
@@ -12838,10 +13086,10 @@ function OnboardingProvider({
|
|
|
12838
13086
|
when: {
|
|
12839
13087
|
show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12840
13088
|
setCurrentStepIndex(index);
|
|
12841
|
-
_optionalChain([stepConfig, 'access',
|
|
13089
|
+
_optionalChain([stepConfig, 'access', _356 => _356.onShow, 'optionalCall', _357 => _357()]);
|
|
12842
13090
|
}, "show"),
|
|
12843
13091
|
hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12844
|
-
_optionalChain([stepConfig, 'access',
|
|
13092
|
+
_optionalChain([stepConfig, 'access', _358 => _358.onHide, 'optionalCall', _359 => _359()]);
|
|
12845
13093
|
}, "hide")
|
|
12846
13094
|
}
|
|
12847
13095
|
});
|
|
@@ -13007,7 +13255,7 @@ function HowToMultiSelector({
|
|
|
13007
13255
|
retriever: (params) => _chunkPQBKPWBYjs.HowToService.findMany(params),
|
|
13008
13256
|
module: _chunkPQBKPWBYjs.Modules.HowTo,
|
|
13009
13257
|
getLabel: (howTo) => howTo.name,
|
|
13010
|
-
excludeId: _optionalChain([currentHowTo, 'optionalAccess',
|
|
13258
|
+
excludeId: _optionalChain([currentHowTo, 'optionalAccess', _360 => _360.id]),
|
|
13011
13259
|
onChange
|
|
13012
13260
|
}
|
|
13013
13261
|
);
|
|
@@ -13115,17 +13363,17 @@ function HowToEditorInternal({
|
|
|
13115
13363
|
);
|
|
13116
13364
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
13117
13365
|
() => ({
|
|
13118
|
-
id: _optionalChain([howTo, 'optionalAccess',
|
|
13119
|
-
name: _optionalChain([howTo, 'optionalAccess',
|
|
13120
|
-
description: _optionalChain([howTo, 'optionalAccess',
|
|
13121
|
-
pages: _chunkPQBKPWBYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess',
|
|
13122
|
-
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13123
|
-
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13124
|
-
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13125
|
-
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13126
|
-
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13127
|
-
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13128
|
-
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13366
|
+
id: _optionalChain([howTo, 'optionalAccess', _361 => _361.id]) || _uuid.v4.call(void 0, ),
|
|
13367
|
+
name: _optionalChain([howTo, 'optionalAccess', _362 => _362.name]) || "",
|
|
13368
|
+
description: _optionalChain([howTo, 'optionalAccess', _363 => _363.description]) || [],
|
|
13369
|
+
pages: _chunkPQBKPWBYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _364 => _364.pages])),
|
|
13370
|
+
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.howToType]), () => ( "how-to")),
|
|
13371
|
+
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.slug]), () => ( "")),
|
|
13372
|
+
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.order]), () => ( 0)),
|
|
13373
|
+
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.summary]), () => ( "")),
|
|
13374
|
+
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _369 => _369.tags]), () => ( []))).join(", "),
|
|
13375
|
+
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _370 => _370.contextualKeys]), () => ( []))).join(", "),
|
|
13376
|
+
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _371 => _371.draft]), () => ( false)),
|
|
13129
13377
|
relatedArticles: []
|
|
13130
13378
|
}),
|
|
13131
13379
|
[howTo]
|
|
@@ -13136,7 +13384,7 @@ function HowToEditorInternal({
|
|
|
13136
13384
|
});
|
|
13137
13385
|
const initialRelatedIds = _react.useRef.call(void 0, []);
|
|
13138
13386
|
_react.useEffect.call(void 0, () => {
|
|
13139
|
-
if (!_optionalChain([howTo, 'optionalAccess',
|
|
13387
|
+
if (!_optionalChain([howTo, 'optionalAccess', _372 => _372.howToType]) || !_optionalChain([howTo, 'optionalAccess', _373 => _373.slug])) return;
|
|
13140
13388
|
let active = true;
|
|
13141
13389
|
_chunkPQBKPWBYjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
|
|
13142
13390
|
if (!active) return;
|
|
@@ -13175,7 +13423,7 @@ function HowToEditorInternal({
|
|
|
13175
13423
|
{
|
|
13176
13424
|
form,
|
|
13177
13425
|
entityType: t(`entities.howtos`, { count: 1 }),
|
|
13178
|
-
entityName: _optionalChain([howTo, 'optionalAccess',
|
|
13426
|
+
entityName: _optionalChain([howTo, 'optionalAccess', _374 => _374.name]),
|
|
13179
13427
|
isEdit: !!howTo,
|
|
13180
13428
|
module: _chunkPQBKPWBYjs.Modules.HowTo,
|
|
13181
13429
|
propagateChanges,
|
|
@@ -13556,7 +13804,7 @@ function withPatchedTitle(source, title) {
|
|
|
13556
13804
|
return _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.Assistant, {
|
|
13557
13805
|
jsonApi: {
|
|
13558
13806
|
...dehydrated.jsonApi,
|
|
13559
|
-
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access',
|
|
13807
|
+
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _375 => _375.jsonApi, 'optionalAccess', _376 => _376.attributes]), () => ( {})), title }
|
|
13560
13808
|
},
|
|
13561
13809
|
included: dehydrated.included
|
|
13562
13810
|
});
|
|
@@ -13577,7 +13825,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13577
13825
|
const [status, setStatus] = _react.useState.call(void 0, void 0);
|
|
13578
13826
|
const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
13579
13827
|
const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
|
|
13580
|
-
() => _optionalChain([dehydratedAssistant, 'optionalAccess',
|
|
13828
|
+
() => _optionalChain([dehydratedAssistant, 'optionalAccess', _377 => _377.jsonApi, 'optionalAccess', _378 => _378.attributes, 'optionalAccess', _379 => _379.engine]) === "operator"
|
|
13581
13829
|
);
|
|
13582
13830
|
const { socket } = useSocketContext();
|
|
13583
13831
|
const sendMessage = _react.useCallback.call(void 0,
|
|
@@ -13586,7 +13834,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13586
13834
|
if (!trimmed) return;
|
|
13587
13835
|
const optimistic = _chunkPQBKPWBYjs.AssistantMessage.buildOptimistic({
|
|
13588
13836
|
content: trimmed,
|
|
13589
|
-
assistantId: _optionalChain([assistant, 'optionalAccess',
|
|
13837
|
+
assistantId: _optionalChain([assistant, 'optionalAccess', _380 => _380.id]),
|
|
13590
13838
|
position: nextPosition(messages)
|
|
13591
13839
|
});
|
|
13592
13840
|
setMessages((prev) => [...prev, optimistic]);
|
|
@@ -13596,13 +13844,13 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13596
13844
|
if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
|
|
13597
13845
|
if (typeof payload.status === "string") setStatus(payload.status);
|
|
13598
13846
|
}, "handler");
|
|
13599
|
-
_optionalChain([socket, 'optionalAccess',
|
|
13847
|
+
_optionalChain([socket, 'optionalAccess', _381 => _381.on, 'call', _382 => _382("assistant:status", handler)]);
|
|
13600
13848
|
try {
|
|
13601
13849
|
if (!assistant) {
|
|
13602
13850
|
const input = {
|
|
13603
13851
|
firstMessage: trimmed,
|
|
13604
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
13605
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
13852
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _383 => _383.howToMode]),
|
|
13853
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _384 => _384.limitToHowToId])
|
|
13606
13854
|
};
|
|
13607
13855
|
const created = operatorMode ? await _chunkPQBKPWBYjs.AssistantService.createOperator(input) : await _chunkPQBKPWBYjs.AssistantService.create(input);
|
|
13608
13856
|
const msgs = await _chunkPQBKPWBYjs.AssistantMessageService.findByAssistant({ assistantId: created.id });
|
|
@@ -13619,8 +13867,8 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13619
13867
|
}) : await _chunkPQBKPWBYjs.AssistantService.appendMessage({
|
|
13620
13868
|
assistantId: assistant.id,
|
|
13621
13869
|
content: trimmed,
|
|
13622
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
13623
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
13870
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _385 => _385.howToMode]),
|
|
13871
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _386 => _386.limitToHowToId])
|
|
13624
13872
|
});
|
|
13625
13873
|
setMessages((prev) => [...stripOptimistic(prev), ...result]);
|
|
13626
13874
|
}
|
|
@@ -13631,7 +13879,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13631
13879
|
return next;
|
|
13632
13880
|
});
|
|
13633
13881
|
} finally {
|
|
13634
|
-
_optionalChain([socket, 'optionalAccess',
|
|
13882
|
+
_optionalChain([socket, 'optionalAccess', _387 => _387.off, 'call', _388 => _388("assistant:status", handler)]);
|
|
13635
13883
|
setSending(false);
|
|
13636
13884
|
setStatus(void 0);
|
|
13637
13885
|
}
|
|
@@ -13689,7 +13937,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13689
13937
|
await _chunkPQBKPWBYjs.AssistantService.delete({ id });
|
|
13690
13938
|
setThreads((prev) => prev.filter((t2) => t2.id !== id));
|
|
13691
13939
|
setAssistant((prev) => {
|
|
13692
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
13940
|
+
if (_optionalChain([prev, 'optionalAccess', _389 => _389.id]) === id) {
|
|
13693
13941
|
setMessages([]);
|
|
13694
13942
|
return void 0;
|
|
13695
13943
|
}
|
|
@@ -13909,7 +14157,7 @@ function EditableAvatar({
|
|
|
13909
14157
|
}, [image, isUploading, patchImage, t]);
|
|
13910
14158
|
const handleFileInputChange = _react.useCallback.call(void 0,
|
|
13911
14159
|
(e) => {
|
|
13912
|
-
const file = _optionalChain([e, 'access',
|
|
14160
|
+
const file = _optionalChain([e, 'access', _390 => _390.target, 'access', _391 => _391.files, 'optionalAccess', _392 => _392[0]]);
|
|
13913
14161
|
if (file) handleFile(file);
|
|
13914
14162
|
e.target.value = "";
|
|
13915
14163
|
},
|
|
@@ -13918,7 +14166,7 @@ function EditableAvatar({
|
|
|
13918
14166
|
const handleDrop = _react.useCallback.call(void 0,
|
|
13919
14167
|
(e) => {
|
|
13920
14168
|
e.preventDefault();
|
|
13921
|
-
const file = _optionalChain([e, 'access',
|
|
14169
|
+
const file = _optionalChain([e, 'access', _393 => _393.dataTransfer, 'access', _394 => _394.files, 'optionalAccess', _395 => _395[0]]);
|
|
13922
14170
|
if (file && file.type.startsWith("image/")) {
|
|
13923
14171
|
handleFile(file);
|
|
13924
14172
|
}
|
|
@@ -13945,7 +14193,7 @@ function EditableAvatar({
|
|
|
13945
14193
|
"button",
|
|
13946
14194
|
{
|
|
13947
14195
|
type: "button",
|
|
13948
|
-
onClick: () => _optionalChain([fileInputRef, 'access',
|
|
14196
|
+
onClick: () => _optionalChain([fileInputRef, 'access', _396 => _396.current, 'optionalAccess', _397 => _397.click, 'call', _398 => _398()]),
|
|
13949
14197
|
disabled: isUploading,
|
|
13950
14198
|
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
13951
14199
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
|
|
@@ -14026,7 +14274,7 @@ function BreadcrumbMobile({
|
|
|
14026
14274
|
}
|
|
14027
14275
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
14028
14276
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
|
|
14029
|
-
_optionalChain([lastItem, 'optionalAccess',
|
|
14277
|
+
_optionalChain([lastItem, 'optionalAccess', _399 => _399.name]),
|
|
14030
14278
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
|
|
14031
14279
|
] }),
|
|
14032
14280
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuItem, { children: item.href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: item.name }) }, index)) })
|
|
@@ -14348,7 +14596,7 @@ var railTriggerClass = _chunkPQBKPWBYjs.cn.call(void 0,
|
|
|
14348
14596
|
"data-[state=active]:bg-foreground data-[state=active]:text-background",
|
|
14349
14597
|
"data-[state=active]:font-semibold data-[state=active]:shadow-none"
|
|
14350
14598
|
);
|
|
14351
|
-
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access',
|
|
14599
|
+
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _400 => _400.key, 'optionalAccess', _401 => _401.name]))), () => ( tab.label)), "tabValue");
|
|
14352
14600
|
function RoundPageContainer({
|
|
14353
14601
|
module,
|
|
14354
14602
|
id,
|
|
@@ -14367,7 +14615,7 @@ function RoundPageContainer({
|
|
|
14367
14615
|
const [mounted, setMounted] = _react.useState.call(void 0, false);
|
|
14368
14616
|
_react.useEffect.call(void 0, () => {
|
|
14369
14617
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
|
|
14370
|
-
if (_optionalChain([match, 'optionalAccess',
|
|
14618
|
+
if (_optionalChain([match, 'optionalAccess', _402 => _402.split, 'call', _403 => _403("="), 'access', _404 => _404[1]]) === "true") setShowDetailsState(true);
|
|
14371
14619
|
}, []);
|
|
14372
14620
|
_react.useEffect.call(void 0, () => {
|
|
14373
14621
|
setMounted(true);
|
|
@@ -14396,7 +14644,7 @@ function RoundPageContainer({
|
|
|
14396
14644
|
},
|
|
14397
14645
|
[module, id, rewriteUrl]
|
|
14398
14646
|
);
|
|
14399
|
-
const activeFillHeight = _optionalChain([tabs, 'optionalAccess',
|
|
14647
|
+
const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _405 => _405.find, 'call', _406 => _406((t) => tabValue(t) === activeTab), 'optionalAccess', _407 => _407.fillHeight]) === true;
|
|
14400
14648
|
const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
|
|
14401
14649
|
const isReady = mounted && isMobile !== void 0;
|
|
14402
14650
|
if (!isReady) {
|
|
@@ -14678,14 +14926,14 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
14678
14926
|
const entityType = target.dataset.mentionType;
|
|
14679
14927
|
const alias = target.dataset.mentionAlias;
|
|
14680
14928
|
setHovered((prev) => {
|
|
14681
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
14929
|
+
if (_optionalChain([prev, 'optionalAccess', _408 => _408.id]) === id && _optionalChain([prev, 'optionalAccess', _409 => _409.element]) === target) return prev;
|
|
14682
14930
|
return { id, entityType, alias, element: target };
|
|
14683
14931
|
});
|
|
14684
14932
|
}, "handleMouseOver");
|
|
14685
14933
|
const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
14686
14934
|
const target = e.target.closest("[data-mention-id]");
|
|
14687
14935
|
if (!target) return;
|
|
14688
|
-
const related = _optionalChain([e, 'access',
|
|
14936
|
+
const related = _optionalChain([e, 'access', _410 => _410.relatedTarget, 'optionalAccess', _411 => _411.closest, 'call', _412 => _412("[data-mention-id]")]);
|
|
14689
14937
|
if (related) return;
|
|
14690
14938
|
scheduleClose();
|
|
14691
14939
|
}, "handleMouseOut");
|
|
@@ -14699,7 +14947,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
14699
14947
|
}, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
|
|
14700
14948
|
if (!hovered || !mentionResolveFn) return null;
|
|
14701
14949
|
const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
|
|
14702
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
14950
|
+
if (!_optionalChain([resolved, 'optionalAccess', _413 => _413.HoverContent])) return null;
|
|
14703
14951
|
const ContentComponent = resolved.HoverContent;
|
|
14704
14952
|
const rect = hovered.element.getBoundingClientRect();
|
|
14705
14953
|
return _reactdom.createPortal.call(void 0,
|
|
@@ -14742,28 +14990,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
14742
14990
|
}, "parseMentionElement");
|
|
14743
14991
|
var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
|
|
14744
14992
|
const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
14745
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
14993
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _414 => _414(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
14746
14994
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
|
|
14747
14995
|
"@",
|
|
14748
14996
|
displayName
|
|
14749
14997
|
] });
|
|
14750
14998
|
}, "MentionExternalHTML");
|
|
14751
14999
|
const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
|
|
14752
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
15000
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _415 => _415(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
14753
15001
|
if (disableMention) {
|
|
14754
|
-
const resolved2 = _optionalChain([resolveFn, 'optionalCall',
|
|
14755
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess',
|
|
15002
|
+
const resolved2 = _optionalChain([resolveFn, 'optionalCall', _416 => _416(props.id, props.entityType, displayName)]);
|
|
15003
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _417 => _417.url]), () => ( "#")), className: "text-primary", children: [
|
|
14756
15004
|
"@",
|
|
14757
15005
|
displayName
|
|
14758
15006
|
] });
|
|
14759
15007
|
}
|
|
14760
|
-
const resolved = _optionalChain([resolveFn, 'optionalCall',
|
|
14761
|
-
if (_optionalChain([resolved, 'optionalAccess',
|
|
15008
|
+
const resolved = _optionalChain([resolveFn, 'optionalCall', _418 => _418(props.id, props.entityType, displayName)]);
|
|
15009
|
+
if (_optionalChain([resolved, 'optionalAccess', _419 => _419.Inline])) {
|
|
14762
15010
|
const Custom = resolved.Inline;
|
|
14763
15011
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
|
|
14764
15012
|
}
|
|
14765
|
-
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
14766
|
-
const handleClick = _optionalChain([resolved, 'optionalAccess',
|
|
15013
|
+
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _420 => _420.url]), () => ( "#"));
|
|
15014
|
+
const handleClick = _optionalChain([resolved, 'optionalAccess', _421 => _421.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
|
|
14767
15015
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
14768
15016
|
_link2.default,
|
|
14769
15017
|
{
|
|
@@ -14869,7 +15117,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
14869
15117
|
if (!suggestionMenuComponent) return void 0;
|
|
14870
15118
|
const Component2 = suggestionMenuComponent;
|
|
14871
15119
|
const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
14872
|
-
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access',
|
|
15120
|
+
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _422 => _422.items, 'access', _423 => _423[0], 'optionalAccess', _424 => _424.title]) === KEEP_OPEN_SENTINEL_TITLE;
|
|
14873
15121
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14874
15122
|
Component2,
|
|
14875
15123
|
{
|
|
@@ -14878,7 +15126,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
14878
15126
|
selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
|
|
14879
15127
|
onItemClick: (item) => {
|
|
14880
15128
|
if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
|
|
14881
|
-
_optionalChain([props, 'access',
|
|
15129
|
+
_optionalChain([props, 'access', _425 => _425.onItemClick, 'optionalCall', _426 => _426(item)]);
|
|
14882
15130
|
}
|
|
14883
15131
|
}
|
|
14884
15132
|
);
|
|
@@ -15072,10 +15320,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
15072
15320
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15073
15321
|
Checkbox,
|
|
15074
15322
|
{
|
|
15075
|
-
checked: _optionalChain([params, 'access',
|
|
15323
|
+
checked: _optionalChain([params, 'access', _427 => _427.checkedIds, 'optionalAccess', _428 => _428.includes, 'call', _429 => _429(row.getValue(params.name))]) || false,
|
|
15076
15324
|
onCheckedChange: (value) => {
|
|
15077
15325
|
row.toggleSelected(!!value);
|
|
15078
|
-
_optionalChain([params, 'access',
|
|
15326
|
+
_optionalChain([params, 'access', _430 => _430.toggleId, 'optionalCall', _431 => _431(row.getValue(params.name))]);
|
|
15079
15327
|
},
|
|
15080
15328
|
"aria-label": "Select row"
|
|
15081
15329
|
}
|
|
@@ -15134,7 +15382,7 @@ function useJsonApiGet(params) {
|
|
|
15134
15382
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
15135
15383
|
const isMounted = _react.useRef.call(void 0, true);
|
|
15136
15384
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
15137
|
-
if (_optionalChain([params, 'access',
|
|
15385
|
+
if (_optionalChain([params, 'access', _432 => _432.options, 'optionalAccess', _433 => _433.enabled]) === false) return;
|
|
15138
15386
|
setLoading(true);
|
|
15139
15387
|
setError(null);
|
|
15140
15388
|
try {
|
|
@@ -15161,9 +15409,9 @@ function useJsonApiGet(params) {
|
|
|
15161
15409
|
setLoading(false);
|
|
15162
15410
|
}
|
|
15163
15411
|
}
|
|
15164
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
15412
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _434 => _434.options, 'optionalAccess', _435 => _435.enabled])]);
|
|
15165
15413
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
15166
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
15414
|
+
if (!_optionalChain([response, 'optionalAccess', _436 => _436.nextPage])) return;
|
|
15167
15415
|
setLoading(true);
|
|
15168
15416
|
try {
|
|
15169
15417
|
const nextResponse = await response.nextPage();
|
|
@@ -15184,7 +15432,7 @@ function useJsonApiGet(params) {
|
|
|
15184
15432
|
}
|
|
15185
15433
|
}, [response]);
|
|
15186
15434
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
15187
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
15435
|
+
if (!_optionalChain([response, 'optionalAccess', _437 => _437.prevPage])) return;
|
|
15188
15436
|
setLoading(true);
|
|
15189
15437
|
try {
|
|
15190
15438
|
const prevResponse = await response.prevPage();
|
|
@@ -15210,15 +15458,15 @@ function useJsonApiGet(params) {
|
|
|
15210
15458
|
return () => {
|
|
15211
15459
|
isMounted.current = false;
|
|
15212
15460
|
};
|
|
15213
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
15461
|
+
}, [fetchData, ..._optionalChain([params, 'access', _438 => _438.options, 'optionalAccess', _439 => _439.deps]) || []]);
|
|
15214
15462
|
return {
|
|
15215
15463
|
data,
|
|
15216
15464
|
loading,
|
|
15217
15465
|
error,
|
|
15218
15466
|
response,
|
|
15219
15467
|
refetch: fetchData,
|
|
15220
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
15221
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
15468
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _440 => _440.next]),
|
|
15469
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _441 => _441.prev]),
|
|
15222
15470
|
fetchNextPage,
|
|
15223
15471
|
fetchPreviousPage
|
|
15224
15472
|
};
|
|
@@ -15296,17 +15544,17 @@ function useJsonApiMutation(config) {
|
|
|
15296
15544
|
if (apiResponse.ok) {
|
|
15297
15545
|
const resultData = apiResponse.data;
|
|
15298
15546
|
setData(resultData);
|
|
15299
|
-
_optionalChain([config, 'access',
|
|
15547
|
+
_optionalChain([config, 'access', _442 => _442.onSuccess, 'optionalCall', _443 => _443(resultData)]);
|
|
15300
15548
|
return resultData;
|
|
15301
15549
|
} else {
|
|
15302
15550
|
setError(apiResponse.error);
|
|
15303
|
-
_optionalChain([config, 'access',
|
|
15551
|
+
_optionalChain([config, 'access', _444 => _444.onError, 'optionalCall', _445 => _445(apiResponse.error)]);
|
|
15304
15552
|
return null;
|
|
15305
15553
|
}
|
|
15306
15554
|
} catch (err) {
|
|
15307
15555
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
15308
15556
|
setError(errorMessage);
|
|
15309
|
-
_optionalChain([config, 'access',
|
|
15557
|
+
_optionalChain([config, 'access', _446 => _446.onError, 'optionalCall', _447 => _447(errorMessage)]);
|
|
15310
15558
|
return null;
|
|
15311
15559
|
} finally {
|
|
15312
15560
|
setLoading(false);
|
|
@@ -15379,7 +15627,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15379
15627
|
{
|
|
15380
15628
|
href: hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
15381
15629
|
page: "/administration",
|
|
15382
|
-
id: _optionalChain([_chunkPQBKPWBYjs.Modules, 'access',
|
|
15630
|
+
id: _optionalChain([_chunkPQBKPWBYjs.Modules, 'access', _448 => _448.Company, 'access', _449 => _449.pageUrl, 'optionalAccess', _450 => _450.substring, 'call', _451 => _451(1)]),
|
|
15383
15631
|
childPage: company.id
|
|
15384
15632
|
}) : generateUrl({ page: _chunkPQBKPWBYjs.Modules.Company, id: company.id }),
|
|
15385
15633
|
children: row.getValue("name")
|
|
@@ -15395,7 +15643,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15395
15643
|
})
|
|
15396
15644
|
};
|
|
15397
15645
|
const columns = _react.useMemo.call(void 0, () => {
|
|
15398
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
15646
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _452 => _452[field], 'optionalCall', _453 => _453()])).filter((col) => col !== void 0);
|
|
15399
15647
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
15400
15648
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15401
15649
|
}, "useCompanyTableStructure");
|
|
@@ -15407,7 +15655,7 @@ var GRACE_DAYS = 3;
|
|
|
15407
15655
|
var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
|
|
15408
15656
|
if (!currentUser || !_chunkJO5BLONKjs.isRolesConfigured.call(void 0, )) return false;
|
|
15409
15657
|
const adminRoleId = _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator;
|
|
15410
|
-
return !!_optionalChain([currentUser, 'access',
|
|
15658
|
+
return !!_optionalChain([currentUser, 'access', _454 => _454.roles, 'optionalAccess', _455 => _455.some, 'call', _456 => _456((role) => role.id === adminRoleId)]);
|
|
15411
15659
|
}, "isAdministrator");
|
|
15412
15660
|
function useSubscriptionStatus() {
|
|
15413
15661
|
const { company, currentUser } = useCurrentUserContext();
|
|
@@ -15524,7 +15772,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
15524
15772
|
})
|
|
15525
15773
|
};
|
|
15526
15774
|
const columns = _react.useMemo.call(void 0, () => {
|
|
15527
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
15775
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _457 => _457[field], 'optionalCall', _458 => _458()])).filter((col) => col !== void 0);
|
|
15528
15776
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
15529
15777
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15530
15778
|
}, "useRoleTableStructure");
|
|
@@ -15625,11 +15873,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15625
15873
|
return params.fields.map((field) => {
|
|
15626
15874
|
const localHandler = fieldColumnMap[field];
|
|
15627
15875
|
if (localHandler) return localHandler();
|
|
15628
|
-
const customHandler = _optionalChain([params, 'access',
|
|
15876
|
+
const customHandler = _optionalChain([params, 'access', _459 => _459.context, 'optionalAccess', _460 => _460.customCells, 'optionalAccess', _461 => _461[field]]);
|
|
15629
15877
|
if (customHandler) return customHandler({ t });
|
|
15630
15878
|
return void 0;
|
|
15631
15879
|
}).filter((col) => col !== void 0);
|
|
15632
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
15880
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _462 => _462.context, 'optionalAccess', _463 => _463.customCells])]);
|
|
15633
15881
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15634
15882
|
}, "useContentTableStructure");
|
|
15635
15883
|
|
|
@@ -15964,7 +16212,7 @@ function ContentTableSearch({ data }) {
|
|
|
15964
16212
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
15965
16213
|
if (!isExpanded) {
|
|
15966
16214
|
setIsFocused(true);
|
|
15967
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
16215
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _464 => _464.current, 'optionalAccess', _465 => _465.focus, 'call', _466 => _466()]), 50);
|
|
15968
16216
|
}
|
|
15969
16217
|
}, "handleSearchIconClick");
|
|
15970
16218
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -15985,6 +16233,7 @@ function ContentTableSearch({ data }) {
|
|
|
15985
16233
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15986
16234
|
_lucidereact.Search,
|
|
15987
16235
|
{
|
|
16236
|
+
"data-testid": "content-table-search-trigger",
|
|
15988
16237
|
className: `absolute top-1 left-1 h-4 w-4 transition-colors ${isExpanded ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground cursor-pointer"}`,
|
|
15989
16238
|
onClick: handleSearchIconClick
|
|
15990
16239
|
}
|
|
@@ -15992,6 +16241,7 @@ function ContentTableSearch({ data }) {
|
|
|
15992
16241
|
isExpanded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15993
16242
|
Input,
|
|
15994
16243
|
{
|
|
16244
|
+
"data-testid": "content-table-search-input",
|
|
15995
16245
|
ref: inputRef,
|
|
15996
16246
|
onKeyDown: (e) => {
|
|
15997
16247
|
if (e.key === "Escape") {
|
|
@@ -16041,7 +16291,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16041
16291
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
16042
16292
|
);
|
|
16043
16293
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
16044
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16294
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _467 => _467.data]), () => ( EMPTY_ARRAY)),
|
|
16045
16295
|
fields,
|
|
16046
16296
|
checkedIds,
|
|
16047
16297
|
toggleId,
|
|
@@ -16074,7 +16324,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16074
16324
|
});
|
|
16075
16325
|
const rowModel = tableData ? table.getRowModel() : null;
|
|
16076
16326
|
const groupedRows = _react.useMemo.call(void 0, () => {
|
|
16077
|
-
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess',
|
|
16327
|
+
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _468 => _468.rows, 'optionalAccess', _469 => _469.length])) return null;
|
|
16078
16328
|
const groupMap = /* @__PURE__ */ new Map();
|
|
16079
16329
|
for (const row of rowModel.rows) {
|
|
16080
16330
|
const keys = getGroupKeys(row.original, props.groupBy);
|
|
@@ -16130,10 +16380,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16130
16380
|
) }),
|
|
16131
16381
|
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
|
|
16132
16382
|
const meta = header.column.columnDef.meta;
|
|
16133
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess',
|
|
16383
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _470 => _470.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
16134
16384
|
}) }, headerGroup.id))
|
|
16135
16385
|
] }),
|
|
16136
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
16386
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _471 => _471.rows, 'optionalAccess', _472 => _472.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
|
|
16137
16387
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16138
16388
|
TableCell,
|
|
16139
16389
|
{
|
|
@@ -16144,11 +16394,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16144
16394
|
) }),
|
|
16145
16395
|
group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
16146
16396
|
const meta = cell.column.columnDef.meta;
|
|
16147
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
16397
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _473 => _473.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
16148
16398
|
}) }, row.id))
|
|
16149
16399
|
] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
16150
16400
|
const meta = cell.column.columnDef.meta;
|
|
16151
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
16401
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _474 => _474.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
16152
16402
|
}) }, row.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: _nullishCoalesce(props.emptyState, () => ( "No results.")) }) }) }),
|
|
16153
16403
|
showFooter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end space-x-2", children: [
|
|
16154
16404
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -16158,7 +16408,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16158
16408
|
size: "sm",
|
|
16159
16409
|
onClick: (e) => {
|
|
16160
16410
|
e.preventDefault();
|
|
16161
|
-
_optionalChain([data, 'access',
|
|
16411
|
+
_optionalChain([data, 'access', _475 => _475.previous, 'optionalCall', _476 => _476(true)]);
|
|
16162
16412
|
},
|
|
16163
16413
|
disabled: !data.previous,
|
|
16164
16414
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
|
|
@@ -16172,7 +16422,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16172
16422
|
size: "sm",
|
|
16173
16423
|
onClick: (e) => {
|
|
16174
16424
|
e.preventDefault();
|
|
16175
|
-
_optionalChain([data, 'access',
|
|
16425
|
+
_optionalChain([data, 'access', _477 => _477.next, 'optionalCall', _478 => _478(true)]);
|
|
16176
16426
|
},
|
|
16177
16427
|
disabled: !data.next,
|
|
16178
16428
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
|
|
@@ -16193,7 +16443,7 @@ function ContentListGrid(props) {
|
|
|
16193
16443
|
if (!data.next || !sentinelRef.current) return;
|
|
16194
16444
|
const observer = new IntersectionObserver(
|
|
16195
16445
|
(entries) => {
|
|
16196
|
-
if (_optionalChain([entries, 'access',
|
|
16446
|
+
if (_optionalChain([entries, 'access', _479 => _479[0], 'optionalAccess', _480 => _480.isIntersecting])) _optionalChain([data, 'access', _481 => _481.next, 'optionalCall', _482 => _482()]);
|
|
16197
16447
|
},
|
|
16198
16448
|
{ threshold: 0.1, rootMargin: "200px" }
|
|
16199
16449
|
);
|
|
@@ -16943,7 +17193,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
16943
17193
|
newDigits[index] = digit;
|
|
16944
17194
|
setDigits(newDigits);
|
|
16945
17195
|
if (digit && index < 5) {
|
|
16946
|
-
_optionalChain([inputRefs, 'access',
|
|
17196
|
+
_optionalChain([inputRefs, 'access', _483 => _483.current, 'access', _484 => _484[index + 1], 'optionalAccess', _485 => _485.focus, 'call', _486 => _486()]);
|
|
16947
17197
|
}
|
|
16948
17198
|
const code = newDigits.join("");
|
|
16949
17199
|
if (code.length === 6 && newDigits.every((d) => d !== "")) {
|
|
@@ -16952,7 +17202,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
16952
17202
|
}, "handleChange");
|
|
16953
17203
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
|
|
16954
17204
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
16955
|
-
_optionalChain([inputRefs, 'access',
|
|
17205
|
+
_optionalChain([inputRefs, 'access', _487 => _487.current, 'access', _488 => _488[index - 1], 'optionalAccess', _489 => _489.focus, 'call', _490 => _490()]);
|
|
16956
17206
|
}
|
|
16957
17207
|
}, "handleKeyDown");
|
|
16958
17208
|
const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
@@ -16961,7 +17211,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
16961
17211
|
if (pastedData.length === 6) {
|
|
16962
17212
|
const newDigits = pastedData.split("");
|
|
16963
17213
|
setDigits(newDigits);
|
|
16964
|
-
_optionalChain([inputRefs, 'access',
|
|
17214
|
+
_optionalChain([inputRefs, 'access', _491 => _491.current, 'access', _492 => _492[5], 'optionalAccess', _493 => _493.focus, 'call', _494 => _494()]);
|
|
16965
17215
|
onComplete(pastedData);
|
|
16966
17216
|
}
|
|
16967
17217
|
}, "handlePaste");
|
|
@@ -17172,8 +17422,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
|
17172
17422
|
try {
|
|
17173
17423
|
const registrationData = await _chunkPQBKPWBYjs.TwoFactorService.getPasskeyRegistrationOptions({
|
|
17174
17424
|
id: _uuid.v4.call(void 0, ),
|
|
17175
|
-
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
17176
|
-
userDisplayName: _optionalChain([currentUser, 'optionalAccess',
|
|
17425
|
+
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _495 => _495.email]), () => ( "")),
|
|
17426
|
+
userDisplayName: _optionalChain([currentUser, 'optionalAccess', _496 => _496.name])
|
|
17177
17427
|
});
|
|
17178
17428
|
const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
|
|
17179
17429
|
await _chunkPQBKPWBYjs.TwoFactorService.verifyPasskeyRegistration({
|
|
@@ -17324,7 +17574,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
17324
17574
|
const setup = await _chunkPQBKPWBYjs.TwoFactorService.setupTotp({
|
|
17325
17575
|
id: _uuid.v4.call(void 0, ),
|
|
17326
17576
|
name: name.trim(),
|
|
17327
|
-
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
17577
|
+
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _497 => _497.email]), () => ( ""))
|
|
17328
17578
|
});
|
|
17329
17579
|
setQrCodeUri(setup.qrCodeUri);
|
|
17330
17580
|
setAuthenticatorId(setup.authenticatorId);
|
|
@@ -17458,7 +17708,7 @@ function TwoFactorSettings() {
|
|
|
17458
17708
|
if (isLoading) {
|
|
17459
17709
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("common.loading") }) }) });
|
|
17460
17710
|
}
|
|
17461
|
-
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
17711
|
+
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _498 => _498.isEnabled]), () => ( false));
|
|
17462
17712
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
17463
17713
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
17464
17714
|
isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "h-6 w-6 text-green-600" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "h-6 w-6 text-yellow-600" }),
|
|
@@ -17496,7 +17746,7 @@ function TwoFactorSettings() {
|
|
|
17496
17746
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
|
|
17497
17747
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
|
|
17498
17748
|
] }),
|
|
17499
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
17749
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _499 => _499.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
|
|
17500
17750
|
] }) }),
|
|
17501
17751
|
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
17502
17752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
@@ -17674,9 +17924,9 @@ function AcceptInvitation() {
|
|
|
17674
17924
|
});
|
|
17675
17925
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
17676
17926
|
try {
|
|
17677
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
17927
|
+
if (!_optionalChain([params, 'optionalAccess', _500 => _500.code])) return;
|
|
17678
17928
|
const payload = {
|
|
17679
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
17929
|
+
code: _optionalChain([params, 'optionalAccess', _501 => _501.code]),
|
|
17680
17930
|
password: values.password
|
|
17681
17931
|
};
|
|
17682
17932
|
await _chunkPQBKPWBYjs.AuthService.acceptInvitation(payload);
|
|
@@ -18026,7 +18276,7 @@ function Logout({ storageKeys }) {
|
|
|
18026
18276
|
const generateUrl = usePageUrlGenerator();
|
|
18027
18277
|
_react.useEffect.call(void 0, () => {
|
|
18028
18278
|
const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
18029
|
-
if (_optionalChain([storageKeys, 'optionalAccess',
|
|
18279
|
+
if (_optionalChain([storageKeys, 'optionalAccess', _502 => _502.length])) {
|
|
18030
18280
|
clearClientStorage(storageKeys);
|
|
18031
18281
|
}
|
|
18032
18282
|
await _chunkPQBKPWBYjs.AuthService.logout();
|
|
@@ -18049,14 +18299,14 @@ function RefreshUser() {
|
|
|
18049
18299
|
setUser(fullUser);
|
|
18050
18300
|
const token = {
|
|
18051
18301
|
userId: fullUser.id,
|
|
18052
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
18302
|
+
companyId: _optionalChain([fullUser, 'access', _503 => _503.company, 'optionalAccess', _504 => _504.id]),
|
|
18053
18303
|
roles: fullUser.roles.map((role) => role.id),
|
|
18054
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
18304
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _505 => _505.company, 'optionalAccess', _506 => _506.features, 'optionalAccess', _507 => _507.map, 'call', _508 => _508((feature) => feature.id)]), () => ( [])),
|
|
18055
18305
|
modules: fullUser.modules.map((module) => {
|
|
18056
18306
|
return { id: module.id, permissions: module.permissions };
|
|
18057
18307
|
})
|
|
18058
18308
|
};
|
|
18059
|
-
await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
18309
|
+
await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _509 => _509.updateToken, 'call', _510 => _510(token)]);
|
|
18060
18310
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
18061
18311
|
}
|
|
18062
18312
|
}, "loadFullUser");
|
|
@@ -18120,9 +18370,9 @@ function ResetPassword() {
|
|
|
18120
18370
|
});
|
|
18121
18371
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
18122
18372
|
try {
|
|
18123
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
18373
|
+
if (!_optionalChain([params, 'optionalAccess', _511 => _511.code])) return;
|
|
18124
18374
|
const payload = {
|
|
18125
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
18375
|
+
code: _optionalChain([params, 'optionalAccess', _512 => _512.code]),
|
|
18126
18376
|
password: values.password
|
|
18127
18377
|
};
|
|
18128
18378
|
await _chunkPQBKPWBYjs.AuthService.resetPassword(payload);
|
|
@@ -18471,7 +18721,7 @@ function extractHeadings(blocks) {
|
|
|
18471
18721
|
function processBlocks(blockArray) {
|
|
18472
18722
|
for (const block of blockArray) {
|
|
18473
18723
|
if (block.type === "heading") {
|
|
18474
|
-
const level = _optionalChain([block, 'access',
|
|
18724
|
+
const level = _optionalChain([block, 'access', _513 => _513.props, 'optionalAccess', _514 => _514.level]) || 1;
|
|
18475
18725
|
const text = extractTextFromContent(block.content);
|
|
18476
18726
|
if (text.trim()) {
|
|
18477
18727
|
headings.push({
|
|
@@ -18814,7 +19064,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
18814
19064
|
})
|
|
18815
19065
|
};
|
|
18816
19066
|
const columns = _react.useMemo.call(void 0, () => {
|
|
18817
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
19067
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _515 => _515[field], 'optionalCall', _516 => _516()])).filter((col) => col !== void 0);
|
|
18818
19068
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
18819
19069
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
18820
19070
|
}, "useHowToTableStructure");
|
|
@@ -18913,7 +19163,7 @@ function HowToSelector({
|
|
|
18913
19163
|
}, "setHowTo");
|
|
18914
19164
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
18915
19165
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
18916
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
19166
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _517 => _517.value, 'optionalAccess', _518 => _518.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
|
|
18917
19167
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
18918
19168
|
_lucidereact.CircleX,
|
|
18919
19169
|
{
|
|
@@ -19282,9 +19532,9 @@ function CitationsTab({ citations, sources }) {
|
|
|
19282
19532
|
] }) }),
|
|
19283
19533
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
|
|
19284
19534
|
const isOpen = expanded.has(chunk.id);
|
|
19285
|
-
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess',
|
|
19535
|
+
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _519 => _519.get, 'call', _520 => _520(chunk.nodeId)]) : void 0;
|
|
19286
19536
|
const fallbackName = chunk.nodeId ? `${_nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")))} ${chunk.nodeId.slice(0, 8)}` : _nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")));
|
|
19287
|
-
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
19537
|
+
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _521 => _521.name]), () => ( fallbackName));
|
|
19288
19538
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
19289
19539
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
|
|
19290
19540
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -19331,7 +19581,7 @@ function ContentsTab({ citations, sources }) {
|
|
|
19331
19581
|
for (const c of citations) {
|
|
19332
19582
|
const id = c.nodeId;
|
|
19333
19583
|
if (!id) continue;
|
|
19334
|
-
const source = _optionalChain([sources, 'optionalAccess',
|
|
19584
|
+
const source = _optionalChain([sources, 'optionalAccess', _522 => _522.get, 'call', _523 => _523(id)]);
|
|
19335
19585
|
if (!source) continue;
|
|
19336
19586
|
const existing = map.get(id);
|
|
19337
19587
|
if (existing) {
|
|
@@ -19398,7 +19648,7 @@ function UsersTab({ users, citations, sources }) {
|
|
|
19398
19648
|
const generate = usePageUrlGenerator();
|
|
19399
19649
|
const userMap = /* @__PURE__ */ new Map();
|
|
19400
19650
|
for (const u of users) {
|
|
19401
|
-
if (!_optionalChain([u, 'optionalAccess',
|
|
19651
|
+
if (!_optionalChain([u, 'optionalAccess', _524 => _524.id])) continue;
|
|
19402
19652
|
userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
|
|
19403
19653
|
}
|
|
19404
19654
|
if (citations && sources) {
|
|
@@ -19503,7 +19753,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
19503
19753
|
}
|
|
19504
19754
|
return ids.size;
|
|
19505
19755
|
}, [message.citations, sources]);
|
|
19506
|
-
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess',
|
|
19756
|
+
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _525 => _525.length]), () => ( 0));
|
|
19507
19757
|
const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
|
|
19508
19758
|
const visibleTabs = [];
|
|
19509
19759
|
if (suggestionsCount > 0) visibleTabs.push("suggested");
|
|
@@ -19563,8 +19813,8 @@ var SourcesFetcher = class extends _chunkPQBKPWBYjs.ClientAbstractService {
|
|
|
19563
19813
|
const endpoint = new (0, _chunkPQBKPWBYjs.EndpointCreator)({ endpoint: params.module });
|
|
19564
19814
|
endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
|
|
19565
19815
|
endpoint.addAdditionalParam("fetchAll", "true");
|
|
19566
|
-
if (_optionalChain([params, 'access',
|
|
19567
|
-
if (_optionalChain([params, 'access',
|
|
19816
|
+
if (_optionalChain([params, 'access', _526 => _526.module, 'access', _527 => _527.inclusions, 'optionalAccess', _528 => _528.lists, 'optionalAccess', _529 => _529.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
|
|
19817
|
+
if (_optionalChain([params, 'access', _530 => _530.module, 'access', _531 => _531.inclusions, 'optionalAccess', _532 => _532.lists, 'optionalAccess', _533 => _533.types])) endpoint.limitToType(params.module.inclusions.lists.types);
|
|
19568
19818
|
return this.callApi({
|
|
19569
19819
|
type: params.module,
|
|
19570
19820
|
method: "GET" /* GET */,
|
|
@@ -19643,7 +19893,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
19643
19893
|
return void 0;
|
|
19644
19894
|
}
|
|
19645
19895
|
})()));
|
|
19646
|
-
if (_optionalChain([author, 'optionalAccess',
|
|
19896
|
+
if (_optionalChain([author, 'optionalAccess', _534 => _534.id])) userMap.set(author.id, author);
|
|
19647
19897
|
}
|
|
19648
19898
|
return Array.from(userMap.values());
|
|
19649
19899
|
}, [resolved]);
|
|
@@ -19672,14 +19922,14 @@ function MessageItem({
|
|
|
19672
19922
|
}) {
|
|
19673
19923
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
19674
19924
|
const isUser = message.role === "user";
|
|
19675
|
-
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess',
|
|
19925
|
+
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _535 => _535.has, 'call', _536 => _536(message.id)]);
|
|
19676
19926
|
if (isUser) {
|
|
19677
19927
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
|
|
19678
19928
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary text-primary-foreground max-w-[72%] rounded-2xl rounded-br-sm px-3.5 py-2 text-sm", children: message.content }),
|
|
19679
19929
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
|
|
19680
19930
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
|
|
19681
19931
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
|
|
19682
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall',
|
|
19932
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _537 => _537(message.id)]), children: t("features.assistant.retry") })
|
|
19683
19933
|
] })
|
|
19684
19934
|
] });
|
|
19685
19935
|
}
|
|
@@ -19755,7 +20005,7 @@ function AssistantThread({
|
|
|
19755
20005
|
}) {
|
|
19756
20006
|
const endRef = _react.useRef.call(void 0, null);
|
|
19757
20007
|
_react.useEffect.call(void 0, () => {
|
|
19758
|
-
_optionalChain([endRef, 'access',
|
|
20008
|
+
_optionalChain([endRef, 'access', _538 => _538.current, 'optionalAccess', _539 => _539.scrollIntoView, 'call', _540 => _540({ behavior: "smooth" })]);
|
|
19759
20009
|
}, [messages.length, sending]);
|
|
19760
20010
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
|
|
19761
20011
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -19784,7 +20034,7 @@ function AssistantContainer({ renderApprovalAction } = {}) {
|
|
|
19784
20034
|
AssistantSidebar,
|
|
19785
20035
|
{
|
|
19786
20036
|
threads: ctx.threads,
|
|
19787
|
-
activeId: _optionalChain([ctx, 'access',
|
|
20037
|
+
activeId: _optionalChain([ctx, 'access', _541 => _541.assistant, 'optionalAccess', _542 => _542.id]),
|
|
19788
20038
|
onSelect: ctx.selectThread,
|
|
19789
20039
|
onNew: ctx.startNew
|
|
19790
20040
|
}
|
|
@@ -19885,14 +20135,14 @@ function NotificationsList({ archived }) {
|
|
|
19885
20135
|
] }),
|
|
19886
20136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
|
|
19887
20137
|
] }) }) }, i)) }), "LoadingSkeleton");
|
|
19888
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access',
|
|
20138
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _543 => _543.data, 'optionalAccess', _544 => _544.map, 'call', _545 => _545((notification) => {
|
|
19889
20139
|
const notificationData = generateNotificationData({ notification, generateUrl });
|
|
19890
20140
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row items-center p-2`, children: [
|
|
19891
20141
|
notificationData.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkPQBKPWBYjs.Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
|
|
19892
20142
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
19893
20143
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
19894
20144
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
19895
|
-
actor: _nullishCoalesce(_optionalChain([notificationData, 'access',
|
|
20145
|
+
actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _546 => _546.actor, 'optionalAccess', _547 => _547.name]), () => ( "")),
|
|
19896
20146
|
title: notificationData.title
|
|
19897
20147
|
}) }),
|
|
19898
20148
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
|
|
@@ -20238,7 +20488,7 @@ var DEFAULT_TRANSLATIONS = {
|
|
|
20238
20488
|
invalidEmail: "Please enter a valid email address"
|
|
20239
20489
|
};
|
|
20240
20490
|
async function copyToClipboard(text) {
|
|
20241
|
-
if (_optionalChain([navigator, 'access',
|
|
20491
|
+
if (_optionalChain([navigator, 'access', _548 => _548.clipboard, 'optionalAccess', _549 => _549.writeText])) {
|
|
20242
20492
|
try {
|
|
20243
20493
|
await navigator.clipboard.writeText(text);
|
|
20244
20494
|
return true;
|
|
@@ -20280,7 +20530,7 @@ function ReferralWidget({
|
|
|
20280
20530
|
const linkInputRef = _react.useRef.call(void 0, null);
|
|
20281
20531
|
const config = _chunkJO5BLONKjs.getReferralConfig.call(void 0, );
|
|
20282
20532
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
20283
|
-
const referralUrl = _optionalChain([stats, 'optionalAccess',
|
|
20533
|
+
const referralUrl = _optionalChain([stats, 'optionalAccess', _550 => _550.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
20284
20534
|
if (!_chunkJO5BLONKjs.isReferralEnabled.call(void 0, )) {
|
|
20285
20535
|
return null;
|
|
20286
20536
|
}
|
|
@@ -20290,7 +20540,7 @@ function ReferralWidget({
|
|
|
20290
20540
|
if (success) {
|
|
20291
20541
|
setCopied(true);
|
|
20292
20542
|
_chunkPQBKPWBYjs.showToast.call(void 0, t.copiedMessage);
|
|
20293
|
-
_optionalChain([onLinkCopied, 'optionalCall',
|
|
20543
|
+
_optionalChain([onLinkCopied, 'optionalCall', _551 => _551()]);
|
|
20294
20544
|
setTimeout(() => setCopied(false), 2e3);
|
|
20295
20545
|
} else {
|
|
20296
20546
|
_chunkPQBKPWBYjs.showError.call(void 0, t.copyError);
|
|
@@ -20304,12 +20554,12 @@ function ReferralWidget({
|
|
|
20304
20554
|
try {
|
|
20305
20555
|
await sendInvite(email);
|
|
20306
20556
|
_chunkPQBKPWBYjs.showToast.call(void 0, t.inviteSent);
|
|
20307
|
-
_optionalChain([onInviteSent, 'optionalCall',
|
|
20557
|
+
_optionalChain([onInviteSent, 'optionalCall', _552 => _552(email)]);
|
|
20308
20558
|
setEmail("");
|
|
20309
20559
|
} catch (err) {
|
|
20310
20560
|
const error2 = err instanceof Error ? err : new Error(t.inviteError);
|
|
20311
20561
|
_chunkPQBKPWBYjs.showError.call(void 0, error2.message);
|
|
20312
|
-
_optionalChain([onInviteError, 'optionalCall',
|
|
20562
|
+
_optionalChain([onInviteError, 'optionalCall', _553 => _553(error2)]);
|
|
20313
20563
|
}
|
|
20314
20564
|
}, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
|
|
20315
20565
|
const handleEmailKeyDown = _react.useCallback.call(void 0,
|
|
@@ -21063,7 +21313,7 @@ function OAuthClientList({
|
|
|
21063
21313
|
OAuthClientCard,
|
|
21064
21314
|
{
|
|
21065
21315
|
client,
|
|
21066
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
21316
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _554 => _554(client)]),
|
|
21067
21317
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
21068
21318
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
21069
21319
|
},
|
|
@@ -21079,11 +21329,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
|
|
|
21079
21329
|
function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
|
|
21080
21330
|
const isEditMode = !!client;
|
|
21081
21331
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
21082
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
21083
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
21084
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
21085
|
-
allowedScopes: _optionalChain([client, 'optionalAccess',
|
|
21086
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
21332
|
+
name: _optionalChain([client, 'optionalAccess', _555 => _555.name]) || "",
|
|
21333
|
+
description: _optionalChain([client, 'optionalAccess', _556 => _556.description]) || "",
|
|
21334
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _557 => _557.redirectUris, 'optionalAccess', _558 => _558.length]) ? client.redirectUris : [""],
|
|
21335
|
+
allowedScopes: _optionalChain([client, 'optionalAccess', _559 => _559.allowedScopes]) || [],
|
|
21336
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _560 => _560.isConfidential]), () => ( true))
|
|
21087
21337
|
});
|
|
21088
21338
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
21089
21339
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -21311,7 +21561,7 @@ function OAuthClientDetail({
|
|
|
21311
21561
|
] }),
|
|
21312
21562
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
21313
21563
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
|
|
21314
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkPQBKPWBYjs.OAUTH_SCOPE_DISPLAY, 'access',
|
|
21564
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkPQBKPWBYjs.OAUTH_SCOPE_DISPLAY, 'access', _561 => _561[scope], 'optionalAccess', _562 => _562.name]) || scope }, scope)) })
|
|
21315
21565
|
] }),
|
|
21316
21566
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
21317
21567
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
|
|
@@ -21455,7 +21705,7 @@ function OAuthConsentScreen({
|
|
|
21455
21705
|
if (error || !clientInfo) {
|
|
21456
21706
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-screen flex items-center justify-center p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full max-w-md", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Alert, { variant: "destructive", children: [
|
|
21457
21707
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
21458
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
21708
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _563 => _563.message]) || "Invalid authorization request. Please try again." })
|
|
21459
21709
|
] }) }) }) });
|
|
21460
21710
|
}
|
|
21461
21711
|
const { client, scopes } = clientInfo;
|
|
@@ -21671,7 +21921,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
21671
21921
|
questionnaire: values.questionnaire
|
|
21672
21922
|
});
|
|
21673
21923
|
setIsSuccess(true);
|
|
21674
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
21924
|
+
_optionalChain([onSuccess, 'optionalCall', _564 => _564()]);
|
|
21675
21925
|
} catch (e) {
|
|
21676
21926
|
errorToast({ error: e });
|
|
21677
21927
|
} finally {
|
|
@@ -22309,7 +22559,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
|
|
|
22309
22559
|
] }),
|
|
22310
22560
|
roleIds.map((roleId) => {
|
|
22311
22561
|
const roleTokens = block[roleId];
|
|
22312
|
-
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22562
|
+
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _565 => _565[roleId]]), () => ( roleId));
|
|
22313
22563
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
22314
22564
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
|
|
22315
22565
|
_chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -22346,7 +22596,7 @@ function RbacContainer() {
|
|
|
22346
22596
|
}, []);
|
|
22347
22597
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
22348
22598
|
if (!matrix) return [];
|
|
22349
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22599
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _566 => _566[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _567 => _567[b]]), () => ( b))));
|
|
22350
22600
|
}, [matrix, moduleNames]);
|
|
22351
22601
|
const roleIds = _react.useMemo.call(void 0, () => {
|
|
22352
22602
|
if (roleNames) {
|
|
@@ -22409,7 +22659,7 @@ function RbacContainer() {
|
|
|
22409
22659
|
id === selectedModuleId && "bg-muted font-medium text-foreground",
|
|
22410
22660
|
id !== selectedModuleId && "text-muted-foreground"
|
|
22411
22661
|
),
|
|
22412
|
-
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22662
|
+
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _568 => _568[id]]), () => ( id))
|
|
22413
22663
|
}
|
|
22414
22664
|
) }, id)) }) }),
|
|
22415
22665
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -22417,7 +22667,7 @@ function RbacContainer() {
|
|
|
22417
22667
|
{
|
|
22418
22668
|
moduleId: selectedModuleId,
|
|
22419
22669
|
block: selectedBlock,
|
|
22420
|
-
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22670
|
+
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _569 => _569[selectedModuleId]]), () => ( selectedModuleId)),
|
|
22421
22671
|
roleIds,
|
|
22422
22672
|
roleNames,
|
|
22423
22673
|
onOpenPicker: openPicker
|
|
@@ -22428,12 +22678,12 @@ function RbacContainer() {
|
|
|
22428
22678
|
RbacPermissionPicker,
|
|
22429
22679
|
{
|
|
22430
22680
|
open: !!activePicker,
|
|
22431
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22681
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _570 => _570.anchor]), () => ( null)),
|
|
22432
22682
|
value: activeValue,
|
|
22433
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22683
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _571 => _571.isRoleColumn]), () => ( false)),
|
|
22434
22684
|
knownSegments: activeSegments,
|
|
22435
22685
|
onSetValue: handleSetValue,
|
|
22436
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
22686
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _572 => _572.isRoleColumn]) ? handleClear : void 0,
|
|
22437
22687
|
onClose: closePicker
|
|
22438
22688
|
}
|
|
22439
22689
|
)
|
|
@@ -22500,7 +22750,7 @@ function RbacByRoleContainer() {
|
|
|
22500
22750
|
}, [roleNames]);
|
|
22501
22751
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
22502
22752
|
if (!matrix) return [];
|
|
22503
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22753
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _573 => _573[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _574 => _574[b]]), () => ( b))));
|
|
22504
22754
|
}, [matrix, moduleNames]);
|
|
22505
22755
|
_react.useEffect.call(void 0, () => {
|
|
22506
22756
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
@@ -22549,7 +22799,7 @@ function RbacByRoleContainer() {
|
|
|
22549
22799
|
id === selectedRoleId && "bg-muted font-medium text-foreground",
|
|
22550
22800
|
id !== selectedRoleId && "text-muted-foreground"
|
|
22551
22801
|
),
|
|
22552
|
-
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22802
|
+
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _575 => _575[id]]), () => ( id))
|
|
22553
22803
|
}
|
|
22554
22804
|
) }, id)) }) }),
|
|
22555
22805
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: sortedModuleIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border border-accent bg-card", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full text-sm", children: [
|
|
@@ -22569,7 +22819,7 @@ function RbacByRoleContainer() {
|
|
|
22569
22819
|
if (!block) return null;
|
|
22570
22820
|
const defaultTokens = _nullishCoalesce(block.default, () => ( []));
|
|
22571
22821
|
const roleTokens = block[selectedRoleId];
|
|
22572
|
-
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22822
|
+
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _576 => _576[moduleId]]), () => ( moduleId));
|
|
22573
22823
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
22574
22824
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22575
22825
|
"td",
|
|
@@ -22584,7 +22834,7 @@ function RbacByRoleContainer() {
|
|
|
22584
22834
|
_chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RbacPermissionCell, { value: cellValue2(defaultTokens, action) }) }, action))
|
|
22585
22835
|
] }),
|
|
22586
22836
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
22587
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22837
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _577 => _577[selectedRoleId]]), () => ( selectedRoleId)) }),
|
|
22588
22838
|
_chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22589
22839
|
CellButton3,
|
|
22590
22840
|
{
|
|
@@ -22605,12 +22855,12 @@ function RbacByRoleContainer() {
|
|
|
22605
22855
|
RbacPermissionPicker,
|
|
22606
22856
|
{
|
|
22607
22857
|
open: !!activePicker,
|
|
22608
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22858
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _578 => _578.anchor]), () => ( null)),
|
|
22609
22859
|
value: activeValue,
|
|
22610
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22860
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _579 => _579.isRoleColumn]), () => ( false)),
|
|
22611
22861
|
knownSegments: activeSegments,
|
|
22612
22862
|
onSetValue: handleSetValue,
|
|
22613
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
22863
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _580 => _580.isRoleColumn]) ? handleClear : void 0,
|
|
22614
22864
|
onClose: closePicker
|
|
22615
22865
|
}
|
|
22616
22866
|
)
|
|
@@ -23144,5 +23394,10 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
|
|
|
23144
23394
|
|
|
23145
23395
|
|
|
23146
23396
|
|
|
23147
|
-
exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.CurrencyInput = CurrencyInput; exports.FormCheckbox = FormCheckbox; exports.FormBlockNote = FormBlockNote; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.GdprConsentCheckbox = GdprConsentCheckbox; exports.FormFeatures = FormFeatures; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantComposer = AssistantComposer; exports.AssistantEmptyState = AssistantEmptyState; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.AssistantContainer = AssistantContainer; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
|
|
23148
|
-
|
|
23397
|
+
|
|
23398
|
+
|
|
23399
|
+
|
|
23400
|
+
|
|
23401
|
+
|
|
23402
|
+
exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.FormFeatures = FormFeatures; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.CurrencyInput = CurrencyInput; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.EntitySelector = EntitySelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormBlockNote = FormBlockNote; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.FormBody = FormBody; exports.FormSection = FormSection; exports.FormRow = FormRow; exports.FormCol = FormCol; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.GdprConsentCheckbox = GdprConsentCheckbox; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantComposer = AssistantComposer; exports.AssistantEmptyState = AssistantEmptyState; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.AssistantContainer = AssistantContainer; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
|
|
23403
|
+
//# sourceMappingURL=chunk-LJLXNH2Z.js.map
|