@carlonicora/nextjs-jsonapi 1.74.0 → 1.76.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-KJZ7FGBA.mjs → BlockNoteEditor-MB6LMBQQ.mjs} +2 -2
- package/dist/{BlockNoteEditor-A37P3FA7.js → BlockNoteEditor-SSFD4U5L.js} +6 -6
- package/dist/{BlockNoteEditor-A37P3FA7.js.map → BlockNoteEditor-SSFD4U5L.js.map} +1 -1
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-XUTMY6K5.js → chunk-4C5ZDJV6.js} +844 -696
- package/dist/chunk-4C5ZDJV6.js.map +1 -0
- package/dist/{chunk-ZNODEBMI.mjs → chunk-JLZBOSTY.mjs} +2971 -2823
- package/dist/chunk-JLZBOSTY.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +37 -3
- package/dist/components/index.d.ts +37 -3
- package/dist/components/index.js +6 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/scripts/generate-web-module/templates/components/multi-selector.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/multi-selector.template.js +14 -120
- package/dist/scripts/generate-web-module/templates/components/multi-selector.template.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-web-module/templates/components/multi-selector.template.ts +14 -120
- package/src/components/forms/EditorSheet.tsx +6 -2
- package/src/components/forms/EntityMultiSelector.tsx +325 -0
- package/src/components/forms/index.ts +1 -0
- package/src/features/how-to/components/forms/HowToMultiSelector.tsx +14 -120
- package/src/features/user/components/forms/UserMultiSelect.tsx +34 -181
- package/src/features/user/components/widgets/index.ts +1 -0
- package/dist/chunk-XUTMY6K5.js.map +0 -1
- package/dist/chunk-ZNODEBMI.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-KJZ7FGBA.mjs.map → BlockNoteEditor-MB6LMBQQ.mjs.map} +0 -0
|
@@ -7765,6 +7765,430 @@ _chunk7QVYU63Ejs.__name.call(void 0, UserEditor, "UserEditor");
|
|
|
7765
7765
|
// src/features/user/components/forms/UserMultiSelect.tsx
|
|
7766
7766
|
|
|
7767
7767
|
|
|
7768
|
+
// src/components/forms/EntityMultiSelector.tsx
|
|
7769
|
+
|
|
7770
|
+
|
|
7771
|
+
|
|
7772
|
+
|
|
7773
|
+
// src/components/forms/FormFieldWrapper.tsx
|
|
7774
|
+
|
|
7775
|
+
|
|
7776
|
+
|
|
7777
|
+
|
|
7778
|
+
function FormFieldWrapper({
|
|
7779
|
+
form,
|
|
7780
|
+
name,
|
|
7781
|
+
label,
|
|
7782
|
+
description,
|
|
7783
|
+
isRequired,
|
|
7784
|
+
orientation = "vertical",
|
|
7785
|
+
children,
|
|
7786
|
+
testId
|
|
7787
|
+
}) {
|
|
7788
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7789
|
+
_reacthookform.Controller,
|
|
7790
|
+
{
|
|
7791
|
+
control: form.control,
|
|
7792
|
+
name,
|
|
7793
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Field, { orientation, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
|
|
7794
|
+
label && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, FieldLabel, { children: [
|
|
7795
|
+
label,
|
|
7796
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-1 font-semibold", children: "*" })
|
|
7797
|
+
] }),
|
|
7798
|
+
children(field, fieldState),
|
|
7799
|
+
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldDescription, { children: description }),
|
|
7800
|
+
fieldState.error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldError, { children: fieldState.error.message })
|
|
7801
|
+
] })
|
|
7802
|
+
}
|
|
7803
|
+
);
|
|
7804
|
+
}
|
|
7805
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormFieldWrapper, "FormFieldWrapper");
|
|
7806
|
+
|
|
7807
|
+
// src/components/forms/EntityMultiSelector.tsx
|
|
7808
|
+
|
|
7809
|
+
var defaultFormValueLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (v) => _nullishCoalesce(v.name, () => ( v.id)), "defaultFormValueLabel");
|
|
7810
|
+
function EntityMultiSelector({
|
|
7811
|
+
id,
|
|
7812
|
+
form,
|
|
7813
|
+
label,
|
|
7814
|
+
placeholder = "Search...",
|
|
7815
|
+
emptyText = "No results found.",
|
|
7816
|
+
isRequired = false,
|
|
7817
|
+
retriever,
|
|
7818
|
+
retrieverParams = {},
|
|
7819
|
+
module,
|
|
7820
|
+
getLabel,
|
|
7821
|
+
toFormValue,
|
|
7822
|
+
getFormValueLabel,
|
|
7823
|
+
excludeId,
|
|
7824
|
+
onChange,
|
|
7825
|
+
renderOption
|
|
7826
|
+
}) {
|
|
7827
|
+
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
7828
|
+
const [searchTerm, setSearchTerm] = _react.useState.call(void 0, "");
|
|
7829
|
+
const [options, setOptions] = _react.useState.call(void 0, []);
|
|
7830
|
+
const searchInputRef = _react.useRef.call(void 0, null);
|
|
7831
|
+
const getLabelRef = _react.useRef.call(void 0, getLabel);
|
|
7832
|
+
const toFormValueRef = _react.useRef.call(void 0, toFormValue);
|
|
7833
|
+
const getFormValueLabelRef = _react.useRef.call(void 0, getFormValueLabel);
|
|
7834
|
+
const onChangeRef = _react.useRef.call(void 0, onChange);
|
|
7835
|
+
_react.useEffect.call(void 0, () => {
|
|
7836
|
+
getLabelRef.current = getLabel;
|
|
7837
|
+
}, [getLabel]);
|
|
7838
|
+
_react.useEffect.call(void 0, () => {
|
|
7839
|
+
toFormValueRef.current = toFormValue;
|
|
7840
|
+
}, [toFormValue]);
|
|
7841
|
+
_react.useEffect.call(void 0, () => {
|
|
7842
|
+
getFormValueLabelRef.current = getFormValueLabel;
|
|
7843
|
+
}, [getFormValueLabel]);
|
|
7844
|
+
_react.useEffect.call(void 0, () => {
|
|
7845
|
+
onChangeRef.current = onChange;
|
|
7846
|
+
}, [onChange]);
|
|
7847
|
+
const stableGetFormValueLabel = _react.useCallback.call(void 0, (v) => {
|
|
7848
|
+
const fn = getFormValueLabelRef.current;
|
|
7849
|
+
return fn ? fn(v) : defaultFormValueLabel(v);
|
|
7850
|
+
}, []);
|
|
7851
|
+
const stableToFormValue = _react.useCallback.call(void 0, (entity) => {
|
|
7852
|
+
const fn = toFormValueRef.current;
|
|
7853
|
+
return fn ? fn(entity) : { id: entity.id, name: getLabelRef.current(entity) };
|
|
7854
|
+
}, []);
|
|
7855
|
+
const selectedValues = _reacthookform.useWatch.call(void 0, { control: form.control, name: id }) || [];
|
|
7856
|
+
const selectedIds = _react.useMemo.call(void 0, () => new Set(selectedValues.map((v) => v.id)), [selectedValues]);
|
|
7857
|
+
const data = useDataListRetriever({
|
|
7858
|
+
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => retriever(params), "retriever"),
|
|
7859
|
+
retrieverParams,
|
|
7860
|
+
ready: true,
|
|
7861
|
+
module
|
|
7862
|
+
});
|
|
7863
|
+
const updateSearch = _react.useCallback.call(void 0,
|
|
7864
|
+
(searchedTerm) => {
|
|
7865
|
+
if (searchedTerm.trim()) {
|
|
7866
|
+
data.addAdditionalParameter("search", searchedTerm.trim());
|
|
7867
|
+
} else {
|
|
7868
|
+
data.removeAdditionalParameter("search");
|
|
7869
|
+
}
|
|
7870
|
+
},
|
|
7871
|
+
[data]
|
|
7872
|
+
);
|
|
7873
|
+
const debouncedUpdateSearch = useDebounce2(updateSearch, 500);
|
|
7874
|
+
_react.useEffect.call(void 0, () => {
|
|
7875
|
+
debouncedUpdateSearch(searchTerm);
|
|
7876
|
+
}, [debouncedUpdateSearch, searchTerm]);
|
|
7877
|
+
_react.useEffect.call(void 0, () => {
|
|
7878
|
+
if (data.data) {
|
|
7879
|
+
const entities = data.data;
|
|
7880
|
+
const filtered = excludeId ? entities.filter((e) => e.id !== excludeId) : entities;
|
|
7881
|
+
const entityOptions = filtered.map((entity) => ({
|
|
7882
|
+
id: entity.id,
|
|
7883
|
+
label: getLabelRef.current(entity),
|
|
7884
|
+
entityData: entity
|
|
7885
|
+
}));
|
|
7886
|
+
const existingIds = new Set(entityOptions.map((o) => o.id));
|
|
7887
|
+
const missingOptions = selectedValues.filter((v) => !existingIds.has(v.id)).map((v) => ({
|
|
7888
|
+
id: v.id,
|
|
7889
|
+
label: stableGetFormValueLabel(v),
|
|
7890
|
+
entityData: v
|
|
7891
|
+
}));
|
|
7892
|
+
setOptions([...entityOptions, ...missingOptions]);
|
|
7893
|
+
}
|
|
7894
|
+
}, [data.data, excludeId, selectedValues, stableGetFormValueLabel]);
|
|
7895
|
+
_react.useEffect.call(void 0, () => {
|
|
7896
|
+
if (open) {
|
|
7897
|
+
setSearchTerm("");
|
|
7898
|
+
requestAnimationFrame(() => {
|
|
7899
|
+
_optionalChain([searchInputRef, 'access', _210 => _210.current, 'optionalAccess', _211 => _211.focus, 'call', _212 => _212()]);
|
|
7900
|
+
});
|
|
7901
|
+
}
|
|
7902
|
+
}, [open]);
|
|
7903
|
+
const toggleEntity = _react.useCallback.call(void 0,
|
|
7904
|
+
(option) => {
|
|
7905
|
+
const current = _nullishCoalesce(form.getValues(id), () => ( []));
|
|
7906
|
+
let next;
|
|
7907
|
+
if (selectedIds.has(option.id)) {
|
|
7908
|
+
next = current.filter((v) => v.id !== option.id);
|
|
7909
|
+
} else {
|
|
7910
|
+
const formValue = option.entityData ? stableToFormValue(option.entityData) : { id: option.id, name: option.label };
|
|
7911
|
+
next = [...current, formValue];
|
|
7912
|
+
}
|
|
7913
|
+
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
7914
|
+
const cb = onChangeRef.current;
|
|
7915
|
+
if (cb) {
|
|
7916
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _213 => _213.find, 'call', _214 => _214((opt) => opt.id === v.id), 'optionalAccess', _215 => _215.entityData])).filter(Boolean);
|
|
7917
|
+
cb(fullData);
|
|
7918
|
+
}
|
|
7919
|
+
},
|
|
7920
|
+
[form, id, selectedIds, options, stableToFormValue]
|
|
7921
|
+
);
|
|
7922
|
+
const removeEntity = _react.useCallback.call(void 0,
|
|
7923
|
+
(entityId) => {
|
|
7924
|
+
const current = _nullishCoalesce(form.getValues(id), () => ( []));
|
|
7925
|
+
const next = current.filter((v) => v.id !== entityId);
|
|
7926
|
+
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
7927
|
+
const cb = onChangeRef.current;
|
|
7928
|
+
if (cb) {
|
|
7929
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _216 => _216.find, 'call', _217 => _217((opt) => opt.id === v.id), 'optionalAccess', _218 => _218.entityData])).filter(Boolean);
|
|
7930
|
+
cb(fullData);
|
|
7931
|
+
}
|
|
7932
|
+
},
|
|
7933
|
+
[form, id, options]
|
|
7934
|
+
);
|
|
7935
|
+
const sortedOptions = _react.useMemo.call(void 0, () => {
|
|
7936
|
+
const filtered = searchTerm.trim() ? options.filter((o) => o.label.toLowerCase().includes(searchTerm.trim().toLowerCase())) : options;
|
|
7937
|
+
return [...filtered].sort((a, b) => {
|
|
7938
|
+
const aSelected = selectedIds.has(a.id) ? 0 : 1;
|
|
7939
|
+
const bSelected = selectedIds.has(b.id) ? 0 : 1;
|
|
7940
|
+
return aSelected - bSelected;
|
|
7941
|
+
});
|
|
7942
|
+
}, [options, selectedIds, searchTerm]);
|
|
7943
|
+
const triggerSummary = _react.useMemo.call(void 0, () => {
|
|
7944
|
+
if (selectedValues.length === 0) return null;
|
|
7945
|
+
return selectedValues.map((v) => stableGetFormValueLabel(v)).join(", ");
|
|
7946
|
+
}, [selectedValues, stableGetFormValueLabel]);
|
|
7947
|
+
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: [
|
|
7948
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
7949
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex min-h-7 w-full items-center gap-2 rounded-md border px-2 text-sm md:text-xs/relaxed", children: [
|
|
7950
|
+
selectedValues.length > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7951
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground min-w-0 flex-1 truncate text-left", children: triggerSummary }),
|
|
7952
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "bg-primary/10 text-primary shrink-0 rounded-full px-1.5 py-0.5 text-[0.625rem] font-medium", children: selectedValues.length })
|
|
7953
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground flex-1 text-left", children: placeholder }),
|
|
7954
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
|
|
7955
|
+
] }) }),
|
|
7956
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverContent, { className: "w-(--anchor-width) flex flex-col gap-0 p-0", align: "start", children: [
|
|
7957
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative p-1.5", children: [
|
|
7958
|
+
/* @__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" }),
|
|
7959
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7960
|
+
Input,
|
|
7961
|
+
{
|
|
7962
|
+
ref: searchInputRef,
|
|
7963
|
+
placeholder,
|
|
7964
|
+
type: "text",
|
|
7965
|
+
className: "h-8 w-full pr-7 pl-7 text-xs",
|
|
7966
|
+
value: searchTerm,
|
|
7967
|
+
onChange: (e) => setSearchTerm(e.target.value)
|
|
7968
|
+
}
|
|
7969
|
+
),
|
|
7970
|
+
searchTerm && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7971
|
+
"button",
|
|
7972
|
+
{
|
|
7973
|
+
type: "button",
|
|
7974
|
+
className: "text-muted-foreground hover:text-foreground absolute top-1/2 right-3.5 -translate-y-1/2",
|
|
7975
|
+
onClick: () => setSearchTerm(""),
|
|
7976
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.XIcon, { className: "size-3.5" })
|
|
7977
|
+
}
|
|
7978
|
+
)
|
|
7979
|
+
] }),
|
|
7980
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-52 overflow-y-auto p-1", children: sortedOptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground py-4 text-center text-xs", children: emptyText }) : sortedOptions.map((option) => {
|
|
7981
|
+
const isSelected = selectedIds.has(option.id);
|
|
7982
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7983
|
+
"button",
|
|
7984
|
+
{
|
|
7985
|
+
type: "button",
|
|
7986
|
+
className: "hover:bg-muted flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-left text-xs/relaxed",
|
|
7987
|
+
onClick: () => toggleEntity(option),
|
|
7988
|
+
children: renderOption && option.entityData ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7989
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7990
|
+
"div",
|
|
7991
|
+
{
|
|
7992
|
+
className: `border-primary flex size-4 shrink-0 items-center justify-center rounded-sm border transition-colors ${isSelected ? "bg-primary text-primary-foreground" : "opacity-50"}`,
|
|
7993
|
+
children: isSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon, { className: "size-3" })
|
|
7994
|
+
}
|
|
7995
|
+
),
|
|
7996
|
+
renderOption(option.entityData, isSelected)
|
|
7997
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7998
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7999
|
+
"div",
|
|
8000
|
+
{
|
|
8001
|
+
className: `border-primary flex size-4 shrink-0 items-center justify-center rounded-sm border transition-colors ${isSelected ? "bg-primary text-primary-foreground" : "opacity-50"}`,
|
|
8002
|
+
children: isSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon, { className: "size-3" })
|
|
8003
|
+
}
|
|
8004
|
+
),
|
|
8005
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: isSelected ? "text-foreground" : "text-muted-foreground", children: option.label })
|
|
8006
|
+
] })
|
|
8007
|
+
},
|
|
8008
|
+
option.id
|
|
8009
|
+
);
|
|
8010
|
+
}) })
|
|
8011
|
+
] })
|
|
8012
|
+
] }),
|
|
8013
|
+
selectedValues.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-1.5", children: selectedValues.map((value) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8014
|
+
Badge,
|
|
8015
|
+
{
|
|
8016
|
+
variant: "outline",
|
|
8017
|
+
className: "h-auto gap-1.5 rounded-md px-2.5 py-1 pr-1.5 text-xs",
|
|
8018
|
+
children: [
|
|
8019
|
+
stableGetFormValueLabel(value),
|
|
8020
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8021
|
+
"button",
|
|
8022
|
+
{
|
|
8023
|
+
type: "button",
|
|
8024
|
+
className: "text-muted-foreground hover:text-foreground rounded-sm p-0.5 transition-colors",
|
|
8025
|
+
onClick: () => removeEntity(value.id),
|
|
8026
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.XIcon, { className: "size-3" })
|
|
8027
|
+
}
|
|
8028
|
+
)
|
|
8029
|
+
]
|
|
8030
|
+
},
|
|
8031
|
+
value.id
|
|
8032
|
+
)) })
|
|
8033
|
+
] }) }) });
|
|
8034
|
+
}
|
|
8035
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntityMultiSelector, "EntityMultiSelector");
|
|
8036
|
+
|
|
8037
|
+
// src/features/user/components/forms/UserMultiSelect.tsx
|
|
8038
|
+
|
|
8039
|
+
function UserAvatarIcon({ className, url, name }) {
|
|
8040
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `${className || "h-4 w-4"}`, children: [
|
|
8041
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: url }),
|
|
8042
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: name ? name.split(" ").map((n) => n.charAt(0).toUpperCase()).join("") : "U" })
|
|
8043
|
+
] });
|
|
8044
|
+
}
|
|
8045
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserAvatarIcon, "UserAvatarIcon");
|
|
8046
|
+
function UserMultiSelect({
|
|
8047
|
+
id,
|
|
8048
|
+
form,
|
|
8049
|
+
currentUser,
|
|
8050
|
+
label,
|
|
8051
|
+
placeholder,
|
|
8052
|
+
onChange,
|
|
8053
|
+
isRequired = false
|
|
8054
|
+
}) {
|
|
8055
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
8056
|
+
const { company } = useCurrentUserContext();
|
|
8057
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8058
|
+
EntityMultiSelector,
|
|
8059
|
+
{
|
|
8060
|
+
id,
|
|
8061
|
+
form,
|
|
8062
|
+
label,
|
|
8063
|
+
placeholder: placeholder || t("ui.search.button"),
|
|
8064
|
+
emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
|
|
8065
|
+
isRequired,
|
|
8066
|
+
retriever: (params) => _chunkFKLP4NEDjs.UserService.findAllUsers(params),
|
|
8067
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _219 => _219.id]) },
|
|
8068
|
+
module: _chunkFKLP4NEDjs.Modules.User,
|
|
8069
|
+
getLabel: (user) => user.name,
|
|
8070
|
+
toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
|
|
8071
|
+
excludeId: _optionalChain([currentUser, 'optionalAccess', _220 => _220.id]),
|
|
8072
|
+
onChange,
|
|
8073
|
+
renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
8074
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
|
|
8075
|
+
user.name
|
|
8076
|
+
] })
|
|
8077
|
+
}
|
|
8078
|
+
);
|
|
8079
|
+
}
|
|
8080
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserMultiSelect, "UserMultiSelect");
|
|
8081
|
+
|
|
8082
|
+
// src/features/user/components/forms/UserReactivator.tsx
|
|
8083
|
+
|
|
8084
|
+
|
|
8085
|
+
|
|
8086
|
+
|
|
8087
|
+
function UserReactivatorInterface({ user, propagateChanges }) {
|
|
8088
|
+
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8089
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
8090
|
+
const reactivateUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
8091
|
+
try {
|
|
8092
|
+
const updatedUser = await _chunkFKLP4NEDjs.UserService.reactivate({ userId: user.id });
|
|
8093
|
+
setOpen(false);
|
|
8094
|
+
propagateChanges(updatedUser);
|
|
8095
|
+
} catch (error) {
|
|
8096
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
8097
|
+
}
|
|
8098
|
+
}, "reactivateUser");
|
|
8099
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
8100
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", children: [
|
|
8101
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UserCheckIcon, { className: "mr-3 h-3.5 w-3.5" }),
|
|
8102
|
+
t(`user.buttons.reactivate`)
|
|
8103
|
+
] }) }),
|
|
8104
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
8105
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
8106
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`user.reactivate.title`) }),
|
|
8107
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`user.reactivate.subtitle`) })
|
|
8108
|
+
] }),
|
|
8109
|
+
t(`user.reactivate.description`, { name: user.name }),
|
|
8110
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
8111
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
8112
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8113
|
+
Button,
|
|
8114
|
+
{
|
|
8115
|
+
type: "submit",
|
|
8116
|
+
onClick: (e) => {
|
|
8117
|
+
e.preventDefault();
|
|
8118
|
+
reactivateUser();
|
|
8119
|
+
},
|
|
8120
|
+
children: t(`user.buttons.reactivate`)
|
|
8121
|
+
}
|
|
8122
|
+
)
|
|
8123
|
+
] })
|
|
8124
|
+
] })
|
|
8125
|
+
] });
|
|
8126
|
+
}
|
|
8127
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserReactivatorInterface, "UserReactivatorInterface");
|
|
8128
|
+
function UserReactivator(props) {
|
|
8129
|
+
const { hasPermissionToModule } = useCurrentUserContext();
|
|
8130
|
+
if (!hasPermissionToModule({ module: _chunkFKLP4NEDjs.Modules.User, action: "update" /* Update */, data: props.user })) return null;
|
|
8131
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserReactivatorInterface, { ...props });
|
|
8132
|
+
}
|
|
8133
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserReactivator, "UserReactivator");
|
|
8134
|
+
|
|
8135
|
+
// src/features/user/components/forms/UserResentInvitationEmail.tsx
|
|
8136
|
+
|
|
8137
|
+
|
|
8138
|
+
|
|
8139
|
+
|
|
8140
|
+
function UserResentInvitationEmailInternal({ user }) {
|
|
8141
|
+
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8142
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
8143
|
+
const sendInvitationEmail = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
8144
|
+
try {
|
|
8145
|
+
await _chunkFKLP4NEDjs.UserService.sendInvitation({ userId: user.id, companyId: user.company.id });
|
|
8146
|
+
setOpen(false);
|
|
8147
|
+
_chunkFKLP4NEDjs.showToast.call(void 0, t(`user.resend_activation.email_sent`), {
|
|
8148
|
+
description: t(`user.resend_activation.email_sent_description`, { email: user.email })
|
|
8149
|
+
});
|
|
8150
|
+
} catch (error) {
|
|
8151
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
8152
|
+
}
|
|
8153
|
+
}, "sendInvitationEmail");
|
|
8154
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
8155
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
8156
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { size: "sm", variant: `ghost`, className: "text-muted-foreground", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MailIcon, {}) }) }) }),
|
|
8157
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`user.buttons.resend_activation`) })
|
|
8158
|
+
] }),
|
|
8159
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
8160
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
8161
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`user.resend_activation.title`) }),
|
|
8162
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`user.resend_activation.subtitle`) })
|
|
8163
|
+
] }),
|
|
8164
|
+
t(`user.resend_activation.description`, { email: user.email }),
|
|
8165
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
8166
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
8167
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8168
|
+
Button,
|
|
8169
|
+
{
|
|
8170
|
+
type: "submit",
|
|
8171
|
+
onClick: (e) => {
|
|
8172
|
+
e.preventDefault();
|
|
8173
|
+
sendInvitationEmail();
|
|
8174
|
+
},
|
|
8175
|
+
children: t(`user.buttons.resend_activation`)
|
|
8176
|
+
}
|
|
8177
|
+
)
|
|
8178
|
+
] })
|
|
8179
|
+
] })
|
|
8180
|
+
] });
|
|
8181
|
+
}
|
|
8182
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserResentInvitationEmailInternal, "UserResentInvitationEmailInternal");
|
|
8183
|
+
function UserResentInvitationEmail(props) {
|
|
8184
|
+
const { hasPermissionToModule } = useCurrentUserContext();
|
|
8185
|
+
if (!hasPermissionToModule({ module: _chunkFKLP4NEDjs.Modules.User, action: "update" /* Update */, data: props.user })) return null;
|
|
8186
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserResentInvitationEmailInternal, { ...props });
|
|
8187
|
+
}
|
|
8188
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserResentInvitationEmail, "UserResentInvitationEmail");
|
|
8189
|
+
|
|
8190
|
+
// src/features/user/components/forms/UserSelector.tsx
|
|
8191
|
+
|
|
7768
8192
|
|
|
7769
8193
|
|
|
7770
8194
|
|
|
@@ -7910,7 +8334,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
|
|
|
7910
8334
|
|
|
7911
8335
|
// src/components/errors/errorToast.ts
|
|
7912
8336
|
function errorToast(params) {
|
|
7913
|
-
_chunkFKLP4NEDjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
8337
|
+
_chunkFKLP4NEDjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _221 => _221.title]), () => ( "Error")), {
|
|
7914
8338
|
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
7915
8339
|
});
|
|
7916
8340
|
}
|
|
@@ -8073,21 +8497,21 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
8073
8497
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8074
8498
|
const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
|
|
8075
8499
|
_react.useEffect.call(void 0, () => {
|
|
8076
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
8500
|
+
if (_optionalChain([options, 'optionalAccess', _222 => _222.dialogOpen]) !== void 0) {
|
|
8077
8501
|
setOpen(options.dialogOpen);
|
|
8078
8502
|
}
|
|
8079
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
8503
|
+
}, [_optionalChain([options, 'optionalAccess', _223 => _223.dialogOpen])]);
|
|
8080
8504
|
_react.useEffect.call(void 0, () => {
|
|
8081
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
8505
|
+
if (typeof _optionalChain([options, 'optionalAccess', _224 => _224.onDialogOpenChange]) === "function") {
|
|
8082
8506
|
options.onDialogOpenChange(open);
|
|
8083
8507
|
}
|
|
8084
|
-
}, [open, _optionalChain([options, 'optionalAccess',
|
|
8508
|
+
}, [open, _optionalChain([options, 'optionalAccess', _225 => _225.onDialogOpenChange])]);
|
|
8085
8509
|
_react.useEffect.call(void 0, () => {
|
|
8086
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
8087
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
8510
|
+
if (_optionalChain([options, 'optionalAccess', _226 => _226.forceShow])) setOpen(true);
|
|
8511
|
+
}, [_optionalChain([options, 'optionalAccess', _227 => _227.forceShow])]);
|
|
8088
8512
|
_react.useEffect.call(void 0, () => {
|
|
8089
8513
|
if (!open) {
|
|
8090
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
8514
|
+
if (_optionalChain([options, 'optionalAccess', _228 => _228.onClose])) options.onClose();
|
|
8091
8515
|
}
|
|
8092
8516
|
}, [open]);
|
|
8093
8517
|
const handleOpenChange = _react.useCallback.call(void 0,
|
|
@@ -8171,10 +8595,13 @@ function EditorSheet({
|
|
|
8171
8595
|
_nullishCoalesce(isFormDirtyProp, () => ( defaultIsFormDirty)),
|
|
8172
8596
|
{ dialogOpen, onDialogOpenChange, forceShow }
|
|
8173
8597
|
);
|
|
8598
|
+
const hasBeenOpen = _react.useRef.call(void 0, false);
|
|
8174
8599
|
_react.useEffect.call(void 0, () => {
|
|
8175
|
-
if (
|
|
8600
|
+
if (open) {
|
|
8601
|
+
hasBeenOpen.current = true;
|
|
8602
|
+
} else if (hasBeenOpen.current) {
|
|
8176
8603
|
form.reset(onReset());
|
|
8177
|
-
_optionalChain([onClose, 'optionalCall',
|
|
8604
|
+
_optionalChain([onClose, 'optionalCall', _229 => _229()]);
|
|
8178
8605
|
}
|
|
8179
8606
|
}, [open]);
|
|
8180
8607
|
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
@@ -8185,11 +8612,11 @@ function EditorSheet({
|
|
|
8185
8612
|
if (onSuccess) {
|
|
8186
8613
|
await onSuccess();
|
|
8187
8614
|
} else if (result) {
|
|
8188
|
-
_optionalChain([onRevalidate, 'optionalCall',
|
|
8615
|
+
_optionalChain([onRevalidate, 'optionalCall', _230 => _230(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
8189
8616
|
if (isEdit && propagateChanges) {
|
|
8190
8617
|
propagateChanges(result);
|
|
8191
8618
|
} else {
|
|
8192
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
8619
|
+
_optionalChain([onNavigate, 'optionalCall', _231 => _231(generateUrl({ page: module, id: result.id }))]);
|
|
8193
8620
|
}
|
|
8194
8621
|
}
|
|
8195
8622
|
} catch (error) {
|
|
@@ -8406,7 +8833,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8406
8833
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8407
8834
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
8408
8835
|
_react.useEffect.call(void 0, () => {
|
|
8409
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
8836
|
+
if (_optionalChain([date, 'optionalAccess', _232 => _232.from]) && _optionalChain([date, 'optionalAccess', _233 => _233.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _234 => _234.from, 'optionalAccess', _235 => _235.getTime, 'call', _236 => _236()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _237 => _237.to, 'optionalAccess', _238 => _238.getTime, 'call', _239 => _239()]) !== date.to.getTime())) {
|
|
8410
8837
|
onDateChange(date);
|
|
8411
8838
|
setPrevRange(date);
|
|
8412
8839
|
setOpen(false);
|
|
@@ -8417,7 +8844,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8417
8844
|
setDate(void 0);
|
|
8418
8845
|
return;
|
|
8419
8846
|
}
|
|
8420
|
-
if (range.from && (!_optionalChain([date, 'optionalAccess',
|
|
8847
|
+
if (range.from && (!_optionalChain([date, 'optionalAccess', _240 => _240.from]) || range.from.getTime() !== date.from.getTime())) {
|
|
8421
8848
|
setDate({ from: range.from, to: void 0 });
|
|
8422
8849
|
} else {
|
|
8423
8850
|
setDate(range);
|
|
@@ -8432,7 +8859,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8432
8859
|
className: _chunkFKLP4NEDjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
|
|
8433
8860
|
children: [
|
|
8434
8861
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
8435
|
-
_optionalChain([date, 'optionalAccess',
|
|
8862
|
+
_optionalChain([date, 'optionalAccess', _241 => _241.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
8436
8863
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
8437
8864
|
" - ",
|
|
8438
8865
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -8445,7 +8872,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8445
8872
|
Calendar,
|
|
8446
8873
|
{
|
|
8447
8874
|
mode: "range",
|
|
8448
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
8875
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _242 => _242.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
8449
8876
|
selected: date,
|
|
8450
8877
|
onSelect: handleSelect,
|
|
8451
8878
|
numberOfMonths: 2
|
|
@@ -8532,7 +8959,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
8532
8959
|
movePrev();
|
|
8533
8960
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
8534
8961
|
if (activeIndex === -1) {
|
|
8535
|
-
_optionalChain([dropzoneState, 'access',
|
|
8962
|
+
_optionalChain([dropzoneState, 'access', _243 => _243.inputRef, 'access', _244 => _244.current, 'optionalAccess', _245 => _245.click, 'call', _246 => _246()]);
|
|
8536
8963
|
}
|
|
8537
8964
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
8538
8965
|
if (activeIndex !== -1) {
|
|
@@ -8570,13 +8997,13 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
8570
8997
|
onValueChange(newValues);
|
|
8571
8998
|
if (rejectedFiles.length > 0) {
|
|
8572
8999
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
8573
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9000
|
+
if (_optionalChain([rejectedFiles, 'access', _247 => _247[i], 'access', _248 => _248.errors, 'access', _249 => _249[0], 'optionalAccess', _250 => _250.code]) === "file-too-large") {
|
|
8574
9001
|
_chunkFKLP4NEDjs.showError.call(void 0, t("common.errors.file"), {
|
|
8575
9002
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
8576
9003
|
});
|
|
8577
9004
|
break;
|
|
8578
9005
|
}
|
|
8579
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9006
|
+
if (_optionalChain([rejectedFiles, 'access', _251 => _251[i], 'access', _252 => _252.errors, 'access', _253 => _253[0], 'optionalAccess', _254 => _254.message])) {
|
|
8580
9007
|
_chunkFKLP4NEDjs.showError.call(void 0, t(`common.errors.file`), {
|
|
8581
9008
|
description: rejectedFiles[i].errors[0].message
|
|
8582
9009
|
});
|
|
@@ -8744,40 +9171,6 @@ var FileInput = _react.forwardRef.call(void 0,
|
|
|
8744
9171
|
);
|
|
8745
9172
|
FileInput.displayName = "FileInput";
|
|
8746
9173
|
|
|
8747
|
-
// src/components/forms/FormFieldWrapper.tsx
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
function FormFieldWrapper({
|
|
8753
|
-
form,
|
|
8754
|
-
name,
|
|
8755
|
-
label,
|
|
8756
|
-
description,
|
|
8757
|
-
isRequired,
|
|
8758
|
-
orientation = "vertical",
|
|
8759
|
-
children,
|
|
8760
|
-
testId
|
|
8761
|
-
}) {
|
|
8762
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8763
|
-
_reacthookform.Controller,
|
|
8764
|
-
{
|
|
8765
|
-
control: form.control,
|
|
8766
|
-
name,
|
|
8767
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Field, { orientation, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
|
|
8768
|
-
label && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, FieldLabel, { children: [
|
|
8769
|
-
label,
|
|
8770
|
-
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-1 font-semibold", children: "*" })
|
|
8771
|
-
] }),
|
|
8772
|
-
children(field, fieldState),
|
|
8773
|
-
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldDescription, { children: description }),
|
|
8774
|
-
fieldState.error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldError, { children: fieldState.error.message })
|
|
8775
|
-
] })
|
|
8776
|
-
}
|
|
8777
|
-
);
|
|
8778
|
-
}
|
|
8779
|
-
_chunk7QVYU63Ejs.__name.call(void 0, FormFieldWrapper, "FormFieldWrapper");
|
|
8780
|
-
|
|
8781
9174
|
// src/components/forms/FormCheckbox.tsx
|
|
8782
9175
|
|
|
8783
9176
|
function FormCheckbox({ form, id, name, labelBefore, description, isRequired }) {
|
|
@@ -8806,7 +9199,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
|
|
|
8806
9199
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
8807
9200
|
|
|
8808
9201
|
|
|
8809
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
9202
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-SSFD4U5L.js"))), {
|
|
8810
9203
|
ssr: false
|
|
8811
9204
|
});
|
|
8812
9205
|
var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -8845,7 +9238,7 @@ function FormBlockNote({
|
|
|
8845
9238
|
initialContent: field.value,
|
|
8846
9239
|
onChange: (content, isEmpty) => {
|
|
8847
9240
|
field.onChange(content);
|
|
8848
|
-
_optionalChain([onEmptyChange, 'optionalCall',
|
|
9241
|
+
_optionalChain([onEmptyChange, 'optionalCall', _255 => _255(isEmpty)]);
|
|
8849
9242
|
},
|
|
8850
9243
|
placeholder,
|
|
8851
9244
|
bordered: true,
|
|
@@ -9359,11 +9752,11 @@ function FormPlaceAutocomplete({
|
|
|
9359
9752
|
const data = await response.json();
|
|
9360
9753
|
if (data.suggestions) {
|
|
9361
9754
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
9362
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
9363
|
-
description: _optionalChain([suggestion, 'access',
|
|
9755
|
+
place_id: _optionalChain([suggestion, 'access', _256 => _256.placePrediction, 'optionalAccess', _257 => _257.placeId]) || "",
|
|
9756
|
+
description: _optionalChain([suggestion, 'access', _258 => _258.placePrediction, 'optionalAccess', _259 => _259.text, 'optionalAccess', _260 => _260.text]) || "",
|
|
9364
9757
|
structured_formatting: {
|
|
9365
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
9366
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
9758
|
+
main_text: _optionalChain([suggestion, 'access', _261 => _261.placePrediction, 'optionalAccess', _262 => _262.structuredFormat, 'optionalAccess', _263 => _263.mainText, 'optionalAccess', _264 => _264.text]) || "",
|
|
9759
|
+
secondary_text: _optionalChain([suggestion, 'access', _265 => _265.placePrediction, 'optionalAccess', _266 => _266.structuredFormat, 'optionalAccess', _267 => _267.secondaryText, 'optionalAccess', _268 => _268.text]) || ""
|
|
9367
9760
|
}
|
|
9368
9761
|
}));
|
|
9369
9762
|
setSuggestions(formattedSuggestions);
|
|
@@ -9510,8 +9903,8 @@ function FormPlaceAutocomplete({
|
|
|
9510
9903
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
9511
9904
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
9512
9905
|
children: [
|
|
9513
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
9514
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
9906
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _269 => _269.structured_formatting, 'optionalAccess', _270 => _270.main_text]) }),
|
|
9907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _271 => _271.structured_formatting, 'optionalAccess', _272 => _272.secondary_text]) })
|
|
9515
9908
|
]
|
|
9516
9909
|
},
|
|
9517
9910
|
suggestion.place_id || index
|
|
@@ -9557,7 +9950,7 @@ function FormSelect({
|
|
|
9557
9950
|
disabled,
|
|
9558
9951
|
"data-testid": testId,
|
|
9559
9952
|
children: [
|
|
9560
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access',
|
|
9953
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _273 => _273.find, 'call', _274 => _274((v) => v.id === field.value), 'optionalAccess', _275 => _275.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
|
|
9561
9954
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
|
|
9562
9955
|
allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
|
|
9563
9956
|
values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
|
|
@@ -9656,307 +10049,62 @@ function GdprConsentCheckbox({
|
|
|
9656
10049
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1 leading-none", children: [
|
|
9657
10050
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-sm font-normal", children: [
|
|
9658
10051
|
label,
|
|
9659
|
-
required && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-1", children: "*" })
|
|
9660
|
-
] }),
|
|
9661
|
-
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldDescription, { className: "text-xs", children: description })
|
|
9662
|
-
] })
|
|
9663
|
-
] }) });
|
|
9664
|
-
}
|
|
9665
|
-
_chunk7QVYU63Ejs.__name.call(void 0, GdprConsentCheckbox, "GdprConsentCheckbox");
|
|
9666
|
-
|
|
9667
|
-
// src/components/forms/MultiFileUploader.tsx
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
var dropzone = {
|
|
9673
|
-
multiple: false,
|
|
9674
|
-
maxSize: 100 * 1024 * 1024,
|
|
9675
|
-
preventDropOnDocument: false,
|
|
9676
|
-
accept: {
|
|
9677
|
-
"application/images": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".docx", ".xslx", ".pdf", ".txt", ".md"]
|
|
9678
|
-
}
|
|
9679
|
-
};
|
|
9680
|
-
|
|
9681
|
-
// src/features/feature/components/forms/FormFeatures.tsx
|
|
9682
|
-
|
|
9683
|
-
function FormFeatures({ form, name, features, featureField = "featureIds" }) {
|
|
9684
|
-
const selectedFeatures = form.watch(featureField);
|
|
9685
|
-
const toggleFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature, checked) => {
|
|
9686
|
-
let newFeatureIds = [...selectedFeatures];
|
|
9687
|
-
if (checked) {
|
|
9688
|
-
if (!newFeatureIds.includes(feature.id)) {
|
|
9689
|
-
newFeatureIds.push(feature.id);
|
|
9690
|
-
}
|
|
9691
|
-
} else {
|
|
9692
|
-
newFeatureIds = newFeatureIds.filter((id) => id !== feature.id);
|
|
9693
|
-
}
|
|
9694
|
-
form.setValue(featureField, newFeatureIds);
|
|
9695
|
-
}, "toggleFeature");
|
|
9696
|
-
const isFeatureChecked = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature) => selectedFeatures.includes(feature.id), "isFeatureChecked");
|
|
9697
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
9698
|
-
name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-4 border-b text-lg font-semibold", children: name }),
|
|
9699
|
-
/* @__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: [
|
|
9700
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9701
|
-
Checkbox,
|
|
9702
|
-
{
|
|
9703
|
-
id: feature.id,
|
|
9704
|
-
checked: isFeatureChecked(feature),
|
|
9705
|
-
onCheckedChange: (val) => {
|
|
9706
|
-
toggleFeature(feature, val === true);
|
|
9707
|
-
}
|
|
9708
|
-
}
|
|
9709
|
-
),
|
|
9710
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: feature.id, className: "ml-3 cursor-pointer font-normal", children: feature.name })
|
|
9711
|
-
] }, feature.id)) }) })
|
|
9712
|
-
] });
|
|
9713
|
-
}
|
|
9714
|
-
_chunk7QVYU63Ejs.__name.call(void 0, FormFeatures, "FormFeatures");
|
|
9715
|
-
|
|
9716
|
-
// src/features/user/components/forms/UserMultiSelect.tsx
|
|
9717
|
-
|
|
9718
|
-
function UserAvatarIcon({ className, url, name }) {
|
|
9719
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `${className || "h-4 w-4"}`, children: [
|
|
9720
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: url }),
|
|
9721
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: name ? name.split(" ").map((n) => n.charAt(0).toUpperCase()).join("") : "U" })
|
|
9722
|
-
] });
|
|
9723
|
-
}
|
|
9724
|
-
_chunk7QVYU63Ejs.__name.call(void 0, UserAvatarIcon, "UserAvatarIcon");
|
|
9725
|
-
function UserMultiSelect({
|
|
9726
|
-
id,
|
|
9727
|
-
form,
|
|
9728
|
-
currentUser,
|
|
9729
|
-
label,
|
|
9730
|
-
placeholder,
|
|
9731
|
-
onChange,
|
|
9732
|
-
maxCount = 3,
|
|
9733
|
-
isRequired = false
|
|
9734
|
-
}) {
|
|
9735
|
-
const t = _nextintl.useTranslations.call(void 0, );
|
|
9736
|
-
const { company } = useCurrentUserContext();
|
|
9737
|
-
const searchTermRef = _react.useRef.call(void 0, "");
|
|
9738
|
-
const [searchTerm, _setSearchTerm] = _react.useState.call(void 0, "");
|
|
9739
|
-
const [isSearching, setIsSearching] = _react.useState.call(void 0, false);
|
|
9740
|
-
const [userOptions, setUserOptions] = _react.useState.call(void 0, []);
|
|
9741
|
-
const selectedUsers = _reacthookform.useWatch.call(void 0, { control: form.control, name: id }) || [];
|
|
9742
|
-
const data = useDataListRetriever({
|
|
9743
|
-
ready: !!company,
|
|
9744
|
-
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
9745
|
-
return _chunkFKLP4NEDjs.UserService.findAllUsers(params);
|
|
9746
|
-
}, "retriever"),
|
|
9747
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _265 => _265.id]) },
|
|
9748
|
-
module: _chunkFKLP4NEDjs.Modules.User
|
|
9749
|
-
});
|
|
9750
|
-
_react.useEffect.call(void 0, () => {
|
|
9751
|
-
if (company) data.setReady(true);
|
|
9752
|
-
}, [company]);
|
|
9753
|
-
const search = _react.useCallback.call(void 0,
|
|
9754
|
-
async (searchedTerm) => {
|
|
9755
|
-
try {
|
|
9756
|
-
if (searchedTerm === searchTermRef.current) return;
|
|
9757
|
-
setIsSearching(true);
|
|
9758
|
-
searchTermRef.current = searchedTerm;
|
|
9759
|
-
await data.search(searchedTerm);
|
|
9760
|
-
} finally {
|
|
9761
|
-
setIsSearching(false);
|
|
9762
|
-
}
|
|
9763
|
-
},
|
|
9764
|
-
[searchTermRef, data]
|
|
9765
|
-
);
|
|
9766
|
-
const updateSearchTerm = useDebounce2(search, 500);
|
|
9767
|
-
_react.useEffect.call(void 0, () => {
|
|
9768
|
-
setIsSearching(true);
|
|
9769
|
-
updateSearchTerm(searchTerm);
|
|
9770
|
-
}, [updateSearchTerm, searchTerm]);
|
|
9771
|
-
_react.useEffect.call(void 0, () => {
|
|
9772
|
-
if (data.data && data.data.length > 0) {
|
|
9773
|
-
const users = data.data;
|
|
9774
|
-
const filteredUsers = users.filter((user) => user.id !== _optionalChain([currentUser, 'optionalAccess', _266 => _266.id]));
|
|
9775
|
-
const options = filteredUsers.map((user) => ({
|
|
9776
|
-
label: user.name,
|
|
9777
|
-
value: user.id,
|
|
9778
|
-
userData: user,
|
|
9779
|
-
avatar: user.avatar
|
|
9780
|
-
}));
|
|
9781
|
-
const existingOptionIds = new Set(options.map((option) => option.value));
|
|
9782
|
-
const missingOptions = selectedUsers.filter((user) => !existingOptionIds.has(user.id)).map((user) => ({
|
|
9783
|
-
label: user.name,
|
|
9784
|
-
value: user.id,
|
|
9785
|
-
userData: user,
|
|
9786
|
-
avatar: user.avatar
|
|
9787
|
-
}));
|
|
9788
|
-
setUserOptions([...options, ...missingOptions]);
|
|
9789
|
-
}
|
|
9790
|
-
}, [data.data, currentUser, selectedUsers]);
|
|
9791
|
-
const selectedOptions = _react.useMemo.call(void 0, () => {
|
|
9792
|
-
return selectedUsers.map((user) => ({
|
|
9793
|
-
value: user.id,
|
|
9794
|
-
label: user.name
|
|
9795
|
-
}));
|
|
9796
|
-
}, [selectedUsers]);
|
|
9797
|
-
const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (options) => {
|
|
9798
|
-
const formValues = options.map((option) => {
|
|
9799
|
-
const userOption = userOptions.find((opt) => opt.value === option.value);
|
|
9800
|
-
return {
|
|
9801
|
-
id: option.value,
|
|
9802
|
-
name: option.label,
|
|
9803
|
-
avatar: _optionalChain([userOption, 'optionalAccess', _267 => _267.avatar])
|
|
9804
|
-
};
|
|
9805
|
-
});
|
|
9806
|
-
form.setValue(id, formValues, { shouldDirty: true, shouldTouch: true });
|
|
9807
|
-
if (onChange) {
|
|
9808
|
-
const fullUsers = options.map((option) => {
|
|
9809
|
-
const userOption = userOptions.find((opt) => opt.value === option.value);
|
|
9810
|
-
return _optionalChain([userOption, 'optionalAccess', _268 => _268.userData]);
|
|
9811
|
-
}).filter(Boolean);
|
|
9812
|
-
onChange(fullUsers);
|
|
9813
|
-
}
|
|
9814
|
-
}, "handleChange");
|
|
9815
|
-
const renderOption = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (option) => {
|
|
9816
|
-
const userOption = option;
|
|
9817
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
9818
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: userOption.avatar, name: option.label }),
|
|
9819
|
-
option.label
|
|
9820
|
-
] });
|
|
9821
|
-
}, "renderOption");
|
|
9822
|
-
const handleSearchSync = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (search2) => {
|
|
9823
|
-
_setSearchTerm(search2);
|
|
9824
|
-
return userOptions;
|
|
9825
|
-
}, "handleSearchSync");
|
|
9826
|
-
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.jsx.call(void 0,
|
|
9827
|
-
MultipleSelector,
|
|
9828
|
-
{
|
|
9829
|
-
value: selectedOptions,
|
|
9830
|
-
onChange: handleChange,
|
|
9831
|
-
options: userOptions,
|
|
9832
|
-
placeholder,
|
|
9833
|
-
maxDisplayCount: maxCount,
|
|
9834
|
-
hideClearAllButton: true,
|
|
9835
|
-
onSearchSync: handleSearchSync,
|
|
9836
|
-
delay: 0,
|
|
9837
|
-
renderOption,
|
|
9838
|
-
loadingIndicator: isSearching ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center py-2", children: [
|
|
9839
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
|
|
9840
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ml-2 text-sm text-muted-foreground", children: t("ui.search.button") })
|
|
9841
|
-
] }) : void 0,
|
|
9842
|
-
emptyIndicator: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }) })
|
|
9843
|
-
}
|
|
9844
|
-
) }) });
|
|
9845
|
-
}
|
|
9846
|
-
_chunk7QVYU63Ejs.__name.call(void 0, UserMultiSelect, "UserMultiSelect");
|
|
9847
|
-
|
|
9848
|
-
// src/features/user/components/forms/UserReactivator.tsx
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
function UserReactivatorInterface({ user, propagateChanges }) {
|
|
9854
|
-
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
9855
|
-
const t = _nextintl.useTranslations.call(void 0, );
|
|
9856
|
-
const reactivateUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
9857
|
-
try {
|
|
9858
|
-
const updatedUser = await _chunkFKLP4NEDjs.UserService.reactivate({ userId: user.id });
|
|
9859
|
-
setOpen(false);
|
|
9860
|
-
propagateChanges(updatedUser);
|
|
9861
|
-
} catch (error) {
|
|
9862
|
-
errorToast({ title: t(`common.errors.error`), error });
|
|
9863
|
-
}
|
|
9864
|
-
}, "reactivateUser");
|
|
9865
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
9866
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", children: [
|
|
9867
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UserCheckIcon, { className: "mr-3 h-3.5 w-3.5" }),
|
|
9868
|
-
t(`user.buttons.reactivate`)
|
|
9869
|
-
] }) }),
|
|
9870
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
9871
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
9872
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`user.reactivate.title`) }),
|
|
9873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`user.reactivate.subtitle`) })
|
|
10052
|
+
required && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-1", children: "*" })
|
|
9874
10053
|
] }),
|
|
9875
|
-
|
|
9876
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
9877
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
9878
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9879
|
-
Button,
|
|
9880
|
-
{
|
|
9881
|
-
type: "submit",
|
|
9882
|
-
onClick: (e) => {
|
|
9883
|
-
e.preventDefault();
|
|
9884
|
-
reactivateUser();
|
|
9885
|
-
},
|
|
9886
|
-
children: t(`user.buttons.reactivate`)
|
|
9887
|
-
}
|
|
9888
|
-
)
|
|
9889
|
-
] })
|
|
10054
|
+
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldDescription, { className: "text-xs", children: description })
|
|
9890
10055
|
] })
|
|
9891
|
-
] });
|
|
9892
|
-
}
|
|
9893
|
-
_chunk7QVYU63Ejs.__name.call(void 0, UserReactivatorInterface, "UserReactivatorInterface");
|
|
9894
|
-
function UserReactivator(props) {
|
|
9895
|
-
const { hasPermissionToModule } = useCurrentUserContext();
|
|
9896
|
-
if (!hasPermissionToModule({ module: _chunkFKLP4NEDjs.Modules.User, action: "update" /* Update */, data: props.user })) return null;
|
|
9897
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserReactivatorInterface, { ...props });
|
|
10056
|
+
] }) });
|
|
9898
10057
|
}
|
|
9899
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
10058
|
+
_chunk7QVYU63Ejs.__name.call(void 0, GdprConsentCheckbox, "GdprConsentCheckbox");
|
|
9900
10059
|
|
|
9901
|
-
// src/
|
|
10060
|
+
// src/components/forms/MultiFileUploader.tsx
|
|
9902
10061
|
|
|
9903
10062
|
|
|
9904
10063
|
|
|
9905
10064
|
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
10065
|
+
var dropzone = {
|
|
10066
|
+
multiple: false,
|
|
10067
|
+
maxSize: 100 * 1024 * 1024,
|
|
10068
|
+
preventDropOnDocument: false,
|
|
10069
|
+
accept: {
|
|
10070
|
+
"application/images": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".docx", ".xslx", ".pdf", ".txt", ".md"]
|
|
10071
|
+
}
|
|
10072
|
+
};
|
|
10073
|
+
|
|
10074
|
+
// src/features/feature/components/forms/FormFeatures.tsx
|
|
10075
|
+
|
|
10076
|
+
function FormFeatures({ form, name, features, featureField = "featureIds" }) {
|
|
10077
|
+
const selectedFeatures = form.watch(featureField);
|
|
10078
|
+
const toggleFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature, checked) => {
|
|
10079
|
+
let newFeatureIds = [...selectedFeatures];
|
|
10080
|
+
if (checked) {
|
|
10081
|
+
if (!newFeatureIds.includes(feature.id)) {
|
|
10082
|
+
newFeatureIds.push(feature.id);
|
|
10083
|
+
}
|
|
10084
|
+
} else {
|
|
10085
|
+
newFeatureIds = newFeatureIds.filter((id) => id !== feature.id);
|
|
9918
10086
|
}
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
]
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
9933
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9934
|
-
Button,
|
|
9935
|
-
{
|
|
9936
|
-
type: "submit",
|
|
9937
|
-
onClick: (e) => {
|
|
9938
|
-
e.preventDefault();
|
|
9939
|
-
sendInvitationEmail();
|
|
9940
|
-
},
|
|
9941
|
-
children: t(`user.buttons.resend_activation`)
|
|
10087
|
+
form.setValue(featureField, newFeatureIds);
|
|
10088
|
+
}, "toggleFeature");
|
|
10089
|
+
const isFeatureChecked = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (feature) => selectedFeatures.includes(feature.id), "isFeatureChecked");
|
|
10090
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
10091
|
+
name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-4 border-b text-lg font-semibold", children: name }),
|
|
10092
|
+
/* @__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: [
|
|
10093
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10094
|
+
Checkbox,
|
|
10095
|
+
{
|
|
10096
|
+
id: feature.id,
|
|
10097
|
+
checked: isFeatureChecked(feature),
|
|
10098
|
+
onCheckedChange: (val) => {
|
|
10099
|
+
toggleFeature(feature, val === true);
|
|
9942
10100
|
}
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
10101
|
+
}
|
|
10102
|
+
),
|
|
10103
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: feature.id, className: "ml-3 cursor-pointer font-normal", children: feature.name })
|
|
10104
|
+
] }, feature.id)) }) })
|
|
9946
10105
|
] });
|
|
9947
10106
|
}
|
|
9948
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
9949
|
-
function UserResentInvitationEmail(props) {
|
|
9950
|
-
const { hasPermissionToModule } = useCurrentUserContext();
|
|
9951
|
-
if (!hasPermissionToModule({ module: _chunkFKLP4NEDjs.Modules.User, action: "update" /* Update */, data: props.user })) return null;
|
|
9952
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserResentInvitationEmailInternal, { ...props });
|
|
9953
|
-
}
|
|
9954
|
-
_chunk7QVYU63Ejs.__name.call(void 0, UserResentInvitationEmail, "UserResentInvitationEmail");
|
|
9955
|
-
|
|
9956
|
-
// src/features/user/components/forms/UserSelector.tsx
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
10107
|
+
_chunk7QVYU63Ejs.__name.call(void 0, FormFeatures, "FormFeatures");
|
|
9960
10108
|
|
|
9961
10109
|
// src/features/user/components/widgets/UserAvatar.tsx
|
|
9962
10110
|
|
|
@@ -9973,7 +10121,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
9973
10121
|
}, "getInitials");
|
|
9974
10122
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9975
10123
|
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: [
|
|
9976
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
10124
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _276 => _276.avatar]) }),
|
|
9977
10125
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials2(user.name) })
|
|
9978
10126
|
] }) });
|
|
9979
10127
|
}, "getAvatar");
|
|
@@ -10005,21 +10153,228 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
10005
10153
|
}
|
|
10006
10154
|
_chunk7QVYU63Ejs.__name.call(void 0, UserAvatar, "UserAvatar");
|
|
10007
10155
|
|
|
10008
|
-
// src/features/user/components/widgets/UserAvatarList.tsx
|
|
10156
|
+
// src/features/user/components/widgets/UserAvatarList.tsx
|
|
10157
|
+
|
|
10158
|
+
function UserAvatarList({ users }) {
|
|
10159
|
+
const generateUrl = usePageUrlGenerator();
|
|
10160
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-row items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-row-reverse justify-end -space-x-1 space-x-reverse", children: users.map((user) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10161
|
+
Link,
|
|
10162
|
+
{
|
|
10163
|
+
href: generateUrl({ page: _chunkFKLP4NEDjs.Modules.User, id: user.id }),
|
|
10164
|
+
onClick: (e) => e.stopPropagation(),
|
|
10165
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user, className: "h-5 w-5" })
|
|
10166
|
+
},
|
|
10167
|
+
user.id
|
|
10168
|
+
)) }) });
|
|
10169
|
+
}
|
|
10170
|
+
_chunk7QVYU63Ejs.__name.call(void 0, UserAvatarList, "UserAvatarList");
|
|
10171
|
+
|
|
10172
|
+
// src/features/user/components/widgets/UserSearchPopover.tsx
|
|
10173
|
+
|
|
10174
|
+
|
|
10175
|
+
|
|
10176
|
+
|
|
10177
|
+
// src/features/user/hooks/useUserSearch.ts
|
|
10178
|
+
|
|
10179
|
+
var useUserSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10180
|
+
const [users, setUsers] = _react.useState.call(void 0, []);
|
|
10181
|
+
const [searchQuery, setSearchQuery] = _react.useState.call(void 0, "");
|
|
10182
|
+
const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
|
|
10183
|
+
const searchQueryRef = _react.useRef.call(void 0, "");
|
|
10184
|
+
const loadUsers = _react.useCallback.call(void 0,
|
|
10185
|
+
async (search) => {
|
|
10186
|
+
try {
|
|
10187
|
+
if (search === searchQueryRef.current && users.length > 0) return;
|
|
10188
|
+
setIsLoading(true);
|
|
10189
|
+
searchQueryRef.current = search;
|
|
10190
|
+
const fetchedUsers = await _chunkFKLP4NEDjs.UserService.findMany({ search, fetchAll: true });
|
|
10191
|
+
setUsers(fetchedUsers);
|
|
10192
|
+
} catch (error) {
|
|
10193
|
+
console.error("Failed to load users:", error);
|
|
10194
|
+
} finally {
|
|
10195
|
+
setIsLoading(false);
|
|
10196
|
+
}
|
|
10197
|
+
},
|
|
10198
|
+
[users.length]
|
|
10199
|
+
);
|
|
10200
|
+
const debouncedLoadUsers = useDebounce2(loadUsers, 500);
|
|
10201
|
+
_react.useEffect.call(void 0, () => {
|
|
10202
|
+
if (searchQuery !== searchQueryRef.current) {
|
|
10203
|
+
setIsLoading(true);
|
|
10204
|
+
debouncedLoadUsers(searchQuery);
|
|
10205
|
+
}
|
|
10206
|
+
}, [searchQuery, debouncedLoadUsers]);
|
|
10207
|
+
const clearSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10208
|
+
setSearchQuery("");
|
|
10209
|
+
searchQueryRef.current = "";
|
|
10210
|
+
}, "clearSearch");
|
|
10211
|
+
return {
|
|
10212
|
+
users,
|
|
10213
|
+
searchQuery,
|
|
10214
|
+
setSearchQuery,
|
|
10215
|
+
isLoading,
|
|
10216
|
+
loadUsers,
|
|
10217
|
+
clearSearch,
|
|
10218
|
+
searchQueryRef
|
|
10219
|
+
};
|
|
10220
|
+
}, "useUserSearch");
|
|
10221
|
+
|
|
10222
|
+
// src/features/user/hooks/useUserTableStructure.tsx
|
|
10223
|
+
|
|
10224
|
+
|
|
10225
|
+
|
|
10226
|
+
var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
10227
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
10228
|
+
const generateUrl = usePageUrlGenerator();
|
|
10229
|
+
const tableData = _react.useMemo.call(void 0, () => {
|
|
10230
|
+
return params.data.map((user) => {
|
|
10231
|
+
const entry = {
|
|
10232
|
+
jsonApiData: user
|
|
10233
|
+
};
|
|
10234
|
+
entry["userId" /* userId */] = user.id;
|
|
10235
|
+
params.fields.forEach((field) => {
|
|
10236
|
+
entry[field] = user[field];
|
|
10237
|
+
});
|
|
10238
|
+
return entry;
|
|
10239
|
+
});
|
|
10240
|
+
}, [params.data, params.fields]);
|
|
10241
|
+
const fieldColumnMap = {
|
|
10242
|
+
["userId" /* userId */]: () => cellId({
|
|
10243
|
+
name: "userId",
|
|
10244
|
+
checkedIds: params.checkedIds,
|
|
10245
|
+
toggleId: params.toggleId
|
|
10246
|
+
}),
|
|
10247
|
+
["name" /* name */]: () => ({
|
|
10248
|
+
id: "name",
|
|
10249
|
+
accessorKey: "name",
|
|
10250
|
+
header: t(`user.fields.name.label`),
|
|
10251
|
+
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
10252
|
+
const user = row.original.jsonApiData;
|
|
10253
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
10254
|
+
Link,
|
|
10255
|
+
{
|
|
10256
|
+
href: generateUrl({ page: _chunkFKLP4NEDjs.Modules.User, id: user.id }),
|
|
10257
|
+
className: _chunkFKLP4NEDjs.cn.call(void 0,
|
|
10258
|
+
`flex items-center justify-start gap-2`,
|
|
10259
|
+
user.isDeleted || !user.isActivated ? "text-muted-foreground italic" : ""
|
|
10260
|
+
),
|
|
10261
|
+
children: [
|
|
10262
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
10263
|
+
user.name,
|
|
10264
|
+
user.isDeleted ? ` - ${t("user.errors.deleted")}` : "",
|
|
10265
|
+
!user.isActivated ? ` - ${t("user.errors.inactive")}` : ""
|
|
10266
|
+
]
|
|
10267
|
+
}
|
|
10268
|
+
);
|
|
10269
|
+
}, "cell"),
|
|
10270
|
+
enableSorting: false,
|
|
10271
|
+
enableHiding: false
|
|
10272
|
+
}),
|
|
10273
|
+
["email" /* email */]: () => ({
|
|
10274
|
+
id: "email",
|
|
10275
|
+
accessorKey: "email",
|
|
10276
|
+
header: t(`common.fields.email.label`),
|
|
10277
|
+
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: row.getValue("email") }), "cell"),
|
|
10278
|
+
enableSorting: false,
|
|
10279
|
+
enableHiding: false
|
|
10280
|
+
}),
|
|
10281
|
+
["relevance" /* relevance */]: () => ({
|
|
10282
|
+
id: "relevance",
|
|
10283
|
+
accessorKey: "relevance",
|
|
10284
|
+
header: t(`common.relevance`),
|
|
10285
|
+
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
10286
|
+
const user = row.original.jsonApiData;
|
|
10287
|
+
if (!user.relevance) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
10288
|
+
const response = `${user.relevance.toFixed(0)}%`;
|
|
10289
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
|
|
10290
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10291
|
+
"div",
|
|
10292
|
+
{
|
|
10293
|
+
className: `bg-accent absolute top-0 left-0 h-full opacity-${Math.round(user.relevance)}`,
|
|
10294
|
+
style: { width: `${user.relevance}%` }
|
|
10295
|
+
}
|
|
10296
|
+
),
|
|
10297
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10298
|
+
"span",
|
|
10299
|
+
{
|
|
10300
|
+
className: `relative text-xs ${user.relevance < 40 ? "text-muted-foreground" : "text-accent-foreground font-semibold"}`,
|
|
10301
|
+
children: response
|
|
10302
|
+
}
|
|
10303
|
+
)
|
|
10304
|
+
] });
|
|
10305
|
+
}, "cell"),
|
|
10306
|
+
enableSorting: false,
|
|
10307
|
+
enableHiding: false
|
|
10308
|
+
}),
|
|
10309
|
+
["createdAt" /* createdAt */]: () => cellDate({
|
|
10310
|
+
name: "createdAt",
|
|
10311
|
+
title: t(`common.date.create`)
|
|
10312
|
+
})
|
|
10313
|
+
};
|
|
10314
|
+
const columns = _react.useMemo.call(void 0, () => {
|
|
10315
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _277 => _277[field], 'optionalCall', _278 => _278()])).filter((col) => col !== void 0);
|
|
10316
|
+
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
10317
|
+
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
10318
|
+
}, "useUserTableStructure");
|
|
10319
|
+
|
|
10320
|
+
// src/features/user/components/widgets/UserSearchPopover.tsx
|
|
10009
10321
|
|
|
10010
|
-
|
|
10011
|
-
const
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10322
|
+
var UserSearchPopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, onSelect, align = "start", className }) => {
|
|
10323
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
10324
|
+
const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
|
|
10325
|
+
const { users, searchQuery, setSearchQuery, isLoading, loadUsers, clearSearch } = useUserSearch();
|
|
10326
|
+
_react.useEffect.call(void 0, () => {
|
|
10327
|
+
if (isOpen && users.length === 0 && !searchQuery) {
|
|
10328
|
+
loadUsers("");
|
|
10329
|
+
}
|
|
10330
|
+
}, [isOpen, users.length, searchQuery, loadUsers]);
|
|
10331
|
+
const handleSelectUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (userId) => {
|
|
10332
|
+
onSelect(userId);
|
|
10333
|
+
setIsOpen(false);
|
|
10334
|
+
clearSearch();
|
|
10335
|
+
}, "handleSelectUser");
|
|
10336
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
10337
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { children }),
|
|
10338
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { align, onClick: (e) => e.stopPropagation(), className: _nullishCoalesce(className, () => ( "w-80")), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Command, { shouldFilter: false, children: [
|
|
10339
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative mb-2 w-full", children: [
|
|
10340
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, { className: "text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" }),
|
|
10341
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10342
|
+
Input,
|
|
10343
|
+
{
|
|
10344
|
+
placeholder: t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }),
|
|
10345
|
+
type: "text",
|
|
10346
|
+
className: "w-full pr-8 pl-8",
|
|
10347
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
10348
|
+
value: searchQuery,
|
|
10349
|
+
onClick: (e) => e.stopPropagation()
|
|
10350
|
+
}
|
|
10351
|
+
),
|
|
10352
|
+
isLoading ? /* @__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" }) : searchQuery ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10353
|
+
_lucidereact.XIcon,
|
|
10354
|
+
{
|
|
10355
|
+
className: "text-muted-foreground hover:text-foreground absolute top-2.5 right-2.5 h-4 w-4 cursor-pointer",
|
|
10356
|
+
onClick: (e) => {
|
|
10357
|
+
e.stopPropagation();
|
|
10358
|
+
clearSearch();
|
|
10359
|
+
}
|
|
10360
|
+
}
|
|
10361
|
+
) : null
|
|
10362
|
+
] }),
|
|
10363
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandList, { children: users.length > 0 ? users.map((user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
10364
|
+
CommandItem,
|
|
10365
|
+
{
|
|
10366
|
+
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
10367
|
+
onSelect: () => handleSelectUser(user.id),
|
|
10368
|
+
children: [
|
|
10369
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user, className: "mr-2 h-4 w-4", showLink: false }),
|
|
10370
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: user.name })
|
|
10371
|
+
]
|
|
10372
|
+
},
|
|
10373
|
+
user.id
|
|
10374
|
+
)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground py-6 text-center text-sm", children: isLoading ? t(`ui.buttons.loading`) : t(`ui.search.no_results`, { type: t(`entities.users`, { count: 1 }) }) }) })
|
|
10375
|
+
] }) })
|
|
10376
|
+
] });
|
|
10377
|
+
}, "UserSearchPopover");
|
|
10023
10378
|
|
|
10024
10379
|
// src/features/user/components/forms/UserSelector.tsx
|
|
10025
10380
|
|
|
@@ -10071,10 +10426,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
10071
10426
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
10072
10427
|
/* @__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: [
|
|
10073
10428
|
/* @__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: [
|
|
10074
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access',
|
|
10075
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access',
|
|
10429
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _279 => _279.value, 'optionalAccess', _280 => _280.avatar]) }),
|
|
10430
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _281 => _281.value, 'optionalAccess', _282 => _282.name]) ? _optionalChain([field, 'access', _283 => _283.value, 'optionalAccess', _284 => _284.name, 'access', _285 => _285.split, 'call', _286 => _286(" "), 'access', _287 => _287.map, 'call', _288 => _288((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
10076
10431
|
] }) }),
|
|
10077
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
10432
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _289 => _289.value, 'optionalAccess', _290 => _290.name]), () => ( "")) })
|
|
10078
10433
|
] }) : /* @__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 }) }))) }) }) }),
|
|
10079
10434
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10080
10435
|
_lucidereact.CircleX,
|
|
@@ -10405,7 +10760,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
|
10405
10760
|
const data = useDataListRetriever({
|
|
10406
10761
|
ready: !!company,
|
|
10407
10762
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkFKLP4NEDjs.UserService.findAllUsers(params), "retriever"),
|
|
10408
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
10763
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _291 => _291.id]), isDeleted },
|
|
10409
10764
|
module: _chunkFKLP4NEDjs.Modules.User
|
|
10410
10765
|
});
|
|
10411
10766
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10512,11 +10867,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
10512
10867
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
10513
10868
|
onClick: (_e) => {
|
|
10514
10869
|
setSelectedUser(user);
|
|
10515
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
10870
|
+
_optionalChain([setLevelOpen, 'optionalCall', _292 => _292(true)]);
|
|
10516
10871
|
},
|
|
10517
10872
|
onSelect: (_e) => {
|
|
10518
10873
|
setSelectedUser(user);
|
|
10519
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
10874
|
+
_optionalChain([setLevelOpen, 'optionalCall', _293 => _293(true)]);
|
|
10520
10875
|
},
|
|
10521
10876
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
10522
10877
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -10647,7 +11002,7 @@ function CompanyContent({ company, actions }) {
|
|
|
10647
11002
|
company.legal_address
|
|
10648
11003
|
] }),
|
|
10649
11004
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
|
|
10650
|
-
_optionalChain([company, 'access',
|
|
11005
|
+
_optionalChain([company, 'access', _294 => _294.configurations, 'optionalAccess', _295 => _295.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
10651
11006
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
10652
11007
|
t("features.configuration.country"),
|
|
10653
11008
|
":"
|
|
@@ -10655,7 +11010,7 @@ function CompanyContent({ company, actions }) {
|
|
|
10655
11010
|
" ",
|
|
10656
11011
|
company.configurations.country
|
|
10657
11012
|
] }),
|
|
10658
|
-
_optionalChain([company, 'access',
|
|
11013
|
+
_optionalChain([company, 'access', _296 => _296.configurations, 'optionalAccess', _297 => _297.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
10659
11014
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
10660
11015
|
t("features.configuration.currency"),
|
|
10661
11016
|
":"
|
|
@@ -11065,7 +11420,7 @@ function CompanyEditorInternal({
|
|
|
11065
11420
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
11066
11421
|
const fiscalRef = _react.useRef.call(void 0, null);
|
|
11067
11422
|
const addressComponentsRef = _react.useRef.call(void 0, {});
|
|
11068
|
-
const canAccessFeatures = hasRole(_chunkOTZEXASKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkOTZEXASKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
11423
|
+
const canAccessFeatures = hasRole(_chunkOTZEXASKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkOTZEXASKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _298 => _298.env, 'access', _299 => _299.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _300 => _300.toLowerCase, 'call', _301 => _301()]) === "true";
|
|
11069
11424
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
11070
11425
|
(open) => {
|
|
11071
11426
|
if (open && features.length === 0 && canAccessFeatures) {
|
|
@@ -11080,7 +11435,7 @@ function CompanyEditorInternal({
|
|
|
11080
11435
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
11081
11436
|
fetchFeatures();
|
|
11082
11437
|
}
|
|
11083
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
11438
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _302 => _302(open)]);
|
|
11084
11439
|
},
|
|
11085
11440
|
[features.length, canAccessFeatures, hasRole, onDialogOpenChange]
|
|
11086
11441
|
);
|
|
@@ -11125,12 +11480,12 @@ function CompanyEditorInternal({
|
|
|
11125
11480
|
);
|
|
11126
11481
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
11127
11482
|
return {
|
|
11128
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
11129
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
11130
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
11131
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
11132
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
11133
|
-
legal_address: _optionalChain([company, 'optionalAccess',
|
|
11483
|
+
id: _optionalChain([company, 'optionalAccess', _303 => _303.id]) || _uuid.v4.call(void 0, ),
|
|
11484
|
+
name: _optionalChain([company, 'optionalAccess', _304 => _304.name]) || "",
|
|
11485
|
+
featureIds: _optionalChain([company, 'optionalAccess', _305 => _305.features, 'access', _306 => _306.map, 'call', _307 => _307((feature) => feature.id)]) || [],
|
|
11486
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _308 => _308.modules, 'access', _309 => _309.map, 'call', _310 => _310((module) => module.id)]) || [],
|
|
11487
|
+
logo: _optionalChain([company, 'optionalAccess', _311 => _311.logo]) || "",
|
|
11488
|
+
legal_address: _optionalChain([company, 'optionalAccess', _312 => _312.legal_address]) || ""
|
|
11134
11489
|
};
|
|
11135
11490
|
}, [company]);
|
|
11136
11491
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -11142,7 +11497,7 @@ function CompanyEditorInternal({
|
|
|
11142
11497
|
{
|
|
11143
11498
|
form,
|
|
11144
11499
|
entityType: t(`entities.companies`, { count: 1 }),
|
|
11145
|
-
entityName: _optionalChain([company, 'optionalAccess',
|
|
11500
|
+
entityName: _optionalChain([company, 'optionalAccess', _313 => _313.name]),
|
|
11146
11501
|
isEdit: !!company,
|
|
11147
11502
|
module: _chunkFKLP4NEDjs.Modules.Company,
|
|
11148
11503
|
propagateChanges,
|
|
@@ -11167,7 +11522,7 @@ function CompanyEditorInternal({
|
|
|
11167
11522
|
throw new Error("Fiscal data validation failed");
|
|
11168
11523
|
}
|
|
11169
11524
|
const payload = {
|
|
11170
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
11525
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _314 => _314.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
11171
11526
|
name: values.name,
|
|
11172
11527
|
logo: files && contentType ? values.logo : void 0,
|
|
11173
11528
|
featureIds: values.featureIds,
|
|
@@ -11198,10 +11553,10 @@ function CompanyEditorInternal({
|
|
|
11198
11553
|
dialogOpen,
|
|
11199
11554
|
onDialogOpenChange: handleDialogOpenChange,
|
|
11200
11555
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
11201
|
-
/* @__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',
|
|
11556
|
+
/* @__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', _315 => _315.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11202
11557
|
_image2.default,
|
|
11203
11558
|
{
|
|
11204
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
11559
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _316 => _316.logo]) || "",
|
|
11205
11560
|
alt: "Company Logo",
|
|
11206
11561
|
width: 200,
|
|
11207
11562
|
height: 200
|
|
@@ -11235,7 +11590,7 @@ function CompanyEditorInternal({
|
|
|
11235
11590
|
}
|
|
11236
11591
|
),
|
|
11237
11592
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mt-2 text-sm font-semibold", children: t(`company.sections.fiscal_data`) }),
|
|
11238
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess',
|
|
11593
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _317 => _317.fiscal_data])) })
|
|
11239
11594
|
] }),
|
|
11240
11595
|
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 }) }) })
|
|
11241
11596
|
] })
|
|
@@ -11352,7 +11707,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
|
|
|
11352
11707
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
11353
11708
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
11354
11709
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
11355
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
11710
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _318 => _318.actor, 'optionalAccess', _319 => _319.name]), () => ( "")),
|
|
11356
11711
|
title: data.title,
|
|
11357
11712
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
11358
11713
|
}) }),
|
|
@@ -11381,7 +11736,7 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
11381
11736
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
11382
11737
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
11383
11738
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
11384
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
11739
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _320 => _320.actor, 'optionalAccess', _321 => _321.name]), () => ( "")),
|
|
11385
11740
|
title: data.title,
|
|
11386
11741
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
11387
11742
|
}) }),
|
|
@@ -11438,7 +11793,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
11438
11793
|
_react.useEffect.call(void 0, () => {
|
|
11439
11794
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
11440
11795
|
if (_chunkOTZEXASKjs.isRolesConfigured.call(void 0, )) {
|
|
11441
|
-
const isAdmin = _optionalChain([currentUser, 'access',
|
|
11796
|
+
const isAdmin = _optionalChain([currentUser, 'access', _322 => _322.roles, 'optionalAccess', _323 => _323.some, 'call', _324 => _324((role) => role.id === _chunkOTZEXASKjs.getRoleId.call(void 0, ).Administrator)]);
|
|
11442
11797
|
if (isAdmin) {
|
|
11443
11798
|
setHasInitiallyLoaded(true);
|
|
11444
11799
|
return;
|
|
@@ -11640,7 +11995,7 @@ function OnboardingProvider({
|
|
|
11640
11995
|
let tourSteps = steps;
|
|
11641
11996
|
if (!tourSteps) {
|
|
11642
11997
|
const tour2 = tours.find((t) => t.id === tourId);
|
|
11643
|
-
tourSteps = _optionalChain([tour2, 'optionalAccess',
|
|
11998
|
+
tourSteps = _optionalChain([tour2, 'optionalAccess', _325 => _325.steps]);
|
|
11644
11999
|
}
|
|
11645
12000
|
if (!tourSteps || tourSteps.length === 0) {
|
|
11646
12001
|
console.warn(`No steps found for tour: ${tourId}`);
|
|
@@ -11708,10 +12063,10 @@ function OnboardingProvider({
|
|
|
11708
12063
|
when: {
|
|
11709
12064
|
show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
11710
12065
|
setCurrentStepIndex(index);
|
|
11711
|
-
_optionalChain([stepConfig, 'access',
|
|
12066
|
+
_optionalChain([stepConfig, 'access', _326 => _326.onShow, 'optionalCall', _327 => _327()]);
|
|
11712
12067
|
}, "show"),
|
|
11713
12068
|
hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
11714
|
-
_optionalChain([stepConfig, 'access',
|
|
12069
|
+
_optionalChain([stepConfig, 'access', _328 => _328.onHide, 'optionalCall', _329 => _329()]);
|
|
11715
12070
|
}, "hide")
|
|
11716
12071
|
}
|
|
11717
12072
|
});
|
|
@@ -11942,10 +12297,10 @@ function HowToEditorInternal({
|
|
|
11942
12297
|
);
|
|
11943
12298
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
11944
12299
|
() => ({
|
|
11945
|
-
id: _optionalChain([howTo, 'optionalAccess',
|
|
11946
|
-
name: _optionalChain([howTo, 'optionalAccess',
|
|
11947
|
-
description: _optionalChain([howTo, 'optionalAccess',
|
|
11948
|
-
pages: _chunkFKLP4NEDjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess',
|
|
12300
|
+
id: _optionalChain([howTo, 'optionalAccess', _330 => _330.id]) || _uuid.v4.call(void 0, ),
|
|
12301
|
+
name: _optionalChain([howTo, 'optionalAccess', _331 => _331.name]) || "",
|
|
12302
|
+
description: _optionalChain([howTo, 'optionalAccess', _332 => _332.description]) || [],
|
|
12303
|
+
pages: _chunkFKLP4NEDjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _333 => _333.pages]))
|
|
11949
12304
|
}),
|
|
11950
12305
|
[howTo]
|
|
11951
12306
|
);
|
|
@@ -11976,7 +12331,7 @@ function HowToEditorInternal({
|
|
|
11976
12331
|
{
|
|
11977
12332
|
form,
|
|
11978
12333
|
entityType: t(`entities.howtos`, { count: 1 }),
|
|
11979
|
-
entityName: _optionalChain([howTo, 'optionalAccess',
|
|
12334
|
+
entityName: _optionalChain([howTo, 'optionalAccess', _334 => _334.name]),
|
|
11980
12335
|
isEdit: !!howTo,
|
|
11981
12336
|
module: _chunkFKLP4NEDjs.Modules.HowTo,
|
|
11982
12337
|
propagateChanges,
|
|
@@ -12268,7 +12623,7 @@ function EditableAvatar({
|
|
|
12268
12623
|
}, [image, isUploading, patchImage, t]);
|
|
12269
12624
|
const handleFileInputChange = _react.useCallback.call(void 0,
|
|
12270
12625
|
(e) => {
|
|
12271
|
-
const file = _optionalChain([e, 'access',
|
|
12626
|
+
const file = _optionalChain([e, 'access', _335 => _335.target, 'access', _336 => _336.files, 'optionalAccess', _337 => _337[0]]);
|
|
12272
12627
|
if (file) handleFile(file);
|
|
12273
12628
|
e.target.value = "";
|
|
12274
12629
|
},
|
|
@@ -12277,7 +12632,7 @@ function EditableAvatar({
|
|
|
12277
12632
|
const handleDrop = _react.useCallback.call(void 0,
|
|
12278
12633
|
(e) => {
|
|
12279
12634
|
e.preventDefault();
|
|
12280
|
-
const file = _optionalChain([e, 'access',
|
|
12635
|
+
const file = _optionalChain([e, 'access', _338 => _338.dataTransfer, 'access', _339 => _339.files, 'optionalAccess', _340 => _340[0]]);
|
|
12281
12636
|
if (file && file.type.startsWith("image/")) {
|
|
12282
12637
|
handleFile(file);
|
|
12283
12638
|
}
|
|
@@ -12304,7 +12659,7 @@ function EditableAvatar({
|
|
|
12304
12659
|
"button",
|
|
12305
12660
|
{
|
|
12306
12661
|
type: "button",
|
|
12307
|
-
onClick: () => _optionalChain([fileInputRef, 'access',
|
|
12662
|
+
onClick: () => _optionalChain([fileInputRef, 'access', _341 => _341.current, 'optionalAccess', _342 => _342.click, 'call', _343 => _343()]),
|
|
12308
12663
|
disabled: isUploading,
|
|
12309
12664
|
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
12310
12665
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
|
|
@@ -12651,7 +13006,7 @@ function RoundPageContainer({
|
|
|
12651
13006
|
const searchParams = _navigation.useSearchParams.call(void 0, );
|
|
12652
13007
|
const section = searchParams.get("section");
|
|
12653
13008
|
const rewriteUrl = useUrlRewriter();
|
|
12654
|
-
const initialValue = tabs ? (section && tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access',
|
|
13009
|
+
const initialValue = tabs ? (section && tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _344 => _344.key, 'optionalAccess', _345 => _345.name]), () => ( i.label))) === section) ? section : null) || (_nullishCoalesce(_optionalChain([tabs, 'access', _346 => _346[0], 'access', _347 => _347.key, 'optionalAccess', _348 => _348.name]), () => ( tabs[0].label))) : void 0;
|
|
12655
13010
|
const [activeTab, setActiveTab] = _react.useState.call(void 0, initialValue);
|
|
12656
13011
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
12657
13012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Header, { leftContent: headerLeftContent, className: "bg-sidebar border-0", children: headerChildren }),
|
|
@@ -12677,8 +13032,8 @@ function RoundPageContainer({
|
|
|
12677
13032
|
if (module && id) rewriteUrl({ page: module, id, additionalParameters: { section: key } });
|
|
12678
13033
|
},
|
|
12679
13034
|
children: [
|
|
12680
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsList, { className: ``, children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTrigger, { value: _nullishCoalesce(_optionalChain([tab, 'access',
|
|
12681
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full overflow-y-auto px-4", children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsContent, { value: _nullishCoalesce(_optionalChain([tab, 'access',
|
|
13035
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsList, { className: ``, children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTrigger, { value: _nullishCoalesce(_optionalChain([tab, 'access', _349 => _349.key, 'optionalAccess', _350 => _350.name]), () => ( tab.label)), className: `px-4`, children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) }) }),
|
|
13036
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full overflow-y-auto px-4", children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsContent, { value: _nullishCoalesce(_optionalChain([tab, 'access', _351 => _351.key, 'optionalAccess', _352 => _352.name]), () => ( tab.label)), className: `pb-20`, children: tab.content }, tab.label)) })
|
|
12682
13037
|
]
|
|
12683
13038
|
}
|
|
12684
13039
|
) : children }) }),
|
|
@@ -12902,10 +13257,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
12902
13257
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12903
13258
|
Checkbox,
|
|
12904
13259
|
{
|
|
12905
|
-
checked: _optionalChain([params, 'access',
|
|
13260
|
+
checked: _optionalChain([params, 'access', _353 => _353.checkedIds, 'optionalAccess', _354 => _354.includes, 'call', _355 => _355(row.getValue(params.name))]) || false,
|
|
12906
13261
|
onCheckedChange: (value) => {
|
|
12907
13262
|
row.toggleSelected(!!value);
|
|
12908
|
-
_optionalChain([params, 'access',
|
|
13263
|
+
_optionalChain([params, 'access', _356 => _356.toggleId, 'optionalCall', _357 => _357(row.getValue(params.name))]);
|
|
12909
13264
|
},
|
|
12910
13265
|
"aria-label": "Select row"
|
|
12911
13266
|
}
|
|
@@ -12964,7 +13319,7 @@ function useJsonApiGet(params) {
|
|
|
12964
13319
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
12965
13320
|
const isMounted = _react.useRef.call(void 0, true);
|
|
12966
13321
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
12967
|
-
if (_optionalChain([params, 'access',
|
|
13322
|
+
if (_optionalChain([params, 'access', _358 => _358.options, 'optionalAccess', _359 => _359.enabled]) === false) return;
|
|
12968
13323
|
setLoading(true);
|
|
12969
13324
|
setError(null);
|
|
12970
13325
|
try {
|
|
@@ -12991,9 +13346,9 @@ function useJsonApiGet(params) {
|
|
|
12991
13346
|
setLoading(false);
|
|
12992
13347
|
}
|
|
12993
13348
|
}
|
|
12994
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
13349
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _360 => _360.options, 'optionalAccess', _361 => _361.enabled])]);
|
|
12995
13350
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
12996
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
13351
|
+
if (!_optionalChain([response, 'optionalAccess', _362 => _362.nextPage])) return;
|
|
12997
13352
|
setLoading(true);
|
|
12998
13353
|
try {
|
|
12999
13354
|
const nextResponse = await response.nextPage();
|
|
@@ -13014,7 +13369,7 @@ function useJsonApiGet(params) {
|
|
|
13014
13369
|
}
|
|
13015
13370
|
}, [response]);
|
|
13016
13371
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
13017
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
13372
|
+
if (!_optionalChain([response, 'optionalAccess', _363 => _363.prevPage])) return;
|
|
13018
13373
|
setLoading(true);
|
|
13019
13374
|
try {
|
|
13020
13375
|
const prevResponse = await response.prevPage();
|
|
@@ -13040,15 +13395,15 @@ function useJsonApiGet(params) {
|
|
|
13040
13395
|
return () => {
|
|
13041
13396
|
isMounted.current = false;
|
|
13042
13397
|
};
|
|
13043
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
13398
|
+
}, [fetchData, ..._optionalChain([params, 'access', _364 => _364.options, 'optionalAccess', _365 => _365.deps]) || []]);
|
|
13044
13399
|
return {
|
|
13045
13400
|
data,
|
|
13046
13401
|
loading,
|
|
13047
13402
|
error,
|
|
13048
13403
|
response,
|
|
13049
13404
|
refetch: fetchData,
|
|
13050
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
13051
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
13405
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _366 => _366.next]),
|
|
13406
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _367 => _367.prev]),
|
|
13052
13407
|
fetchNextPage,
|
|
13053
13408
|
fetchPreviousPage
|
|
13054
13409
|
};
|
|
@@ -13126,17 +13481,17 @@ function useJsonApiMutation(config) {
|
|
|
13126
13481
|
if (apiResponse.ok) {
|
|
13127
13482
|
const resultData = apiResponse.data;
|
|
13128
13483
|
setData(resultData);
|
|
13129
|
-
_optionalChain([config, 'access',
|
|
13484
|
+
_optionalChain([config, 'access', _368 => _368.onSuccess, 'optionalCall', _369 => _369(resultData)]);
|
|
13130
13485
|
return resultData;
|
|
13131
13486
|
} else {
|
|
13132
13487
|
setError(apiResponse.error);
|
|
13133
|
-
_optionalChain([config, 'access',
|
|
13488
|
+
_optionalChain([config, 'access', _370 => _370.onError, 'optionalCall', _371 => _371(apiResponse.error)]);
|
|
13134
13489
|
return null;
|
|
13135
13490
|
}
|
|
13136
13491
|
} catch (err) {
|
|
13137
13492
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
13138
13493
|
setError(errorMessage);
|
|
13139
|
-
_optionalChain([config, 'access',
|
|
13494
|
+
_optionalChain([config, 'access', _372 => _372.onError, 'optionalCall', _373 => _373(errorMessage)]);
|
|
13140
13495
|
return null;
|
|
13141
13496
|
} finally {
|
|
13142
13497
|
setLoading(false);
|
|
@@ -13209,7 +13564,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
13209
13564
|
{
|
|
13210
13565
|
href: hasRole(_chunkOTZEXASKjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
13211
13566
|
page: "/administration",
|
|
13212
|
-
id: _optionalChain([_chunkFKLP4NEDjs.Modules, 'access',
|
|
13567
|
+
id: _optionalChain([_chunkFKLP4NEDjs.Modules, 'access', _374 => _374.Company, 'access', _375 => _375.pageUrl, 'optionalAccess', _376 => _376.substring, 'call', _377 => _377(1)]),
|
|
13213
13568
|
childPage: company.id
|
|
13214
13569
|
}) : generateUrl({ page: _chunkFKLP4NEDjs.Modules.Company, id: company.id }),
|
|
13215
13570
|
children: row.getValue("name")
|
|
@@ -13225,7 +13580,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
13225
13580
|
})
|
|
13226
13581
|
};
|
|
13227
13582
|
const columns = _react.useMemo.call(void 0, () => {
|
|
13228
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
13583
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _378 => _378[field], 'optionalCall', _379 => _379()])).filter((col) => col !== void 0);
|
|
13229
13584
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
13230
13585
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
13231
13586
|
}, "useCompanyTableStructure");
|
|
@@ -13237,7 +13592,7 @@ var GRACE_DAYS = 3;
|
|
|
13237
13592
|
var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
|
|
13238
13593
|
if (!currentUser || !_chunkOTZEXASKjs.isRolesConfigured.call(void 0, )) return false;
|
|
13239
13594
|
const adminRoleId = _chunkOTZEXASKjs.getRoleId.call(void 0, ).Administrator;
|
|
13240
|
-
return !!_optionalChain([currentUser, 'access',
|
|
13595
|
+
return !!_optionalChain([currentUser, 'access', _380 => _380.roles, 'optionalAccess', _381 => _381.some, 'call', _382 => _382((role) => role.id === adminRoleId)]);
|
|
13241
13596
|
}, "isAdministrator");
|
|
13242
13597
|
function useSubscriptionStatus() {
|
|
13243
13598
|
const { company, currentUser } = useCurrentUserContext();
|
|
@@ -13354,154 +13709,11 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
13354
13709
|
})
|
|
13355
13710
|
};
|
|
13356
13711
|
const columns = _react.useMemo.call(void 0, () => {
|
|
13357
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
13712
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _383 => _383[field], 'optionalCall', _384 => _384()])).filter((col) => col !== void 0);
|
|
13358
13713
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
13359
13714
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
13360
13715
|
}, "useRoleTableStructure");
|
|
13361
13716
|
|
|
13362
|
-
// src/features/user/hooks/useUserSearch.ts
|
|
13363
|
-
|
|
13364
|
-
var useUserSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
13365
|
-
const [users, setUsers] = _react.useState.call(void 0, []);
|
|
13366
|
-
const [searchQuery, setSearchQuery] = _react.useState.call(void 0, "");
|
|
13367
|
-
const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
|
|
13368
|
-
const searchQueryRef = _react.useRef.call(void 0, "");
|
|
13369
|
-
const loadUsers = _react.useCallback.call(void 0,
|
|
13370
|
-
async (search) => {
|
|
13371
|
-
try {
|
|
13372
|
-
if (search === searchQueryRef.current && users.length > 0) return;
|
|
13373
|
-
setIsLoading(true);
|
|
13374
|
-
searchQueryRef.current = search;
|
|
13375
|
-
const fetchedUsers = await _chunkFKLP4NEDjs.UserService.findMany({ search, fetchAll: true });
|
|
13376
|
-
setUsers(fetchedUsers);
|
|
13377
|
-
} catch (error) {
|
|
13378
|
-
console.error("Failed to load users:", error);
|
|
13379
|
-
} finally {
|
|
13380
|
-
setIsLoading(false);
|
|
13381
|
-
}
|
|
13382
|
-
},
|
|
13383
|
-
[users.length]
|
|
13384
|
-
);
|
|
13385
|
-
const debouncedLoadUsers = useDebounce2(loadUsers, 500);
|
|
13386
|
-
_react.useEffect.call(void 0, () => {
|
|
13387
|
-
if (searchQuery !== searchQueryRef.current) {
|
|
13388
|
-
setIsLoading(true);
|
|
13389
|
-
debouncedLoadUsers(searchQuery);
|
|
13390
|
-
}
|
|
13391
|
-
}, [searchQuery, debouncedLoadUsers]);
|
|
13392
|
-
const clearSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
13393
|
-
setSearchQuery("");
|
|
13394
|
-
searchQueryRef.current = "";
|
|
13395
|
-
}, "clearSearch");
|
|
13396
|
-
return {
|
|
13397
|
-
users,
|
|
13398
|
-
searchQuery,
|
|
13399
|
-
setSearchQuery,
|
|
13400
|
-
isLoading,
|
|
13401
|
-
loadUsers,
|
|
13402
|
-
clearSearch,
|
|
13403
|
-
searchQueryRef
|
|
13404
|
-
};
|
|
13405
|
-
}, "useUserSearch");
|
|
13406
|
-
|
|
13407
|
-
// src/features/user/hooks/useUserTableStructure.tsx
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
13412
|
-
const t = _nextintl.useTranslations.call(void 0, );
|
|
13413
|
-
const generateUrl = usePageUrlGenerator();
|
|
13414
|
-
const tableData = _react.useMemo.call(void 0, () => {
|
|
13415
|
-
return params.data.map((user) => {
|
|
13416
|
-
const entry = {
|
|
13417
|
-
jsonApiData: user
|
|
13418
|
-
};
|
|
13419
|
-
entry["userId" /* userId */] = user.id;
|
|
13420
|
-
params.fields.forEach((field) => {
|
|
13421
|
-
entry[field] = user[field];
|
|
13422
|
-
});
|
|
13423
|
-
return entry;
|
|
13424
|
-
});
|
|
13425
|
-
}, [params.data, params.fields]);
|
|
13426
|
-
const fieldColumnMap = {
|
|
13427
|
-
["userId" /* userId */]: () => cellId({
|
|
13428
|
-
name: "userId",
|
|
13429
|
-
checkedIds: params.checkedIds,
|
|
13430
|
-
toggleId: params.toggleId
|
|
13431
|
-
}),
|
|
13432
|
-
["name" /* name */]: () => ({
|
|
13433
|
-
id: "name",
|
|
13434
|
-
accessorKey: "name",
|
|
13435
|
-
header: t(`user.fields.name.label`),
|
|
13436
|
-
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
13437
|
-
const user = row.original.jsonApiData;
|
|
13438
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
13439
|
-
Link,
|
|
13440
|
-
{
|
|
13441
|
-
href: generateUrl({ page: _chunkFKLP4NEDjs.Modules.User, id: user.id }),
|
|
13442
|
-
className: _chunkFKLP4NEDjs.cn.call(void 0,
|
|
13443
|
-
`flex items-center justify-start gap-2`,
|
|
13444
|
-
user.isDeleted || !user.isActivated ? "text-muted-foreground italic" : ""
|
|
13445
|
-
),
|
|
13446
|
-
children: [
|
|
13447
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
13448
|
-
user.name,
|
|
13449
|
-
user.isDeleted ? ` - ${t("user.errors.deleted")}` : "",
|
|
13450
|
-
!user.isActivated ? ` - ${t("user.errors.inactive")}` : ""
|
|
13451
|
-
]
|
|
13452
|
-
}
|
|
13453
|
-
);
|
|
13454
|
-
}, "cell"),
|
|
13455
|
-
enableSorting: false,
|
|
13456
|
-
enableHiding: false
|
|
13457
|
-
}),
|
|
13458
|
-
["email" /* email */]: () => ({
|
|
13459
|
-
id: "email",
|
|
13460
|
-
accessorKey: "email",
|
|
13461
|
-
header: t(`common.fields.email.label`),
|
|
13462
|
-
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: row.getValue("email") }), "cell"),
|
|
13463
|
-
enableSorting: false,
|
|
13464
|
-
enableHiding: false
|
|
13465
|
-
}),
|
|
13466
|
-
["relevance" /* relevance */]: () => ({
|
|
13467
|
-
id: "relevance",
|
|
13468
|
-
accessorKey: "relevance",
|
|
13469
|
-
header: t(`common.relevance`),
|
|
13470
|
-
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
13471
|
-
const user = row.original.jsonApiData;
|
|
13472
|
-
if (!user.relevance) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
13473
|
-
const response = `${user.relevance.toFixed(0)}%`;
|
|
13474
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
|
|
13475
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13476
|
-
"div",
|
|
13477
|
-
{
|
|
13478
|
-
className: `bg-accent absolute top-0 left-0 h-full opacity-${Math.round(user.relevance)}`,
|
|
13479
|
-
style: { width: `${user.relevance}%` }
|
|
13480
|
-
}
|
|
13481
|
-
),
|
|
13482
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13483
|
-
"span",
|
|
13484
|
-
{
|
|
13485
|
-
className: `relative text-xs ${user.relevance < 40 ? "text-muted-foreground" : "text-accent-foreground font-semibold"}`,
|
|
13486
|
-
children: response
|
|
13487
|
-
}
|
|
13488
|
-
)
|
|
13489
|
-
] });
|
|
13490
|
-
}, "cell"),
|
|
13491
|
-
enableSorting: false,
|
|
13492
|
-
enableHiding: false
|
|
13493
|
-
}),
|
|
13494
|
-
["createdAt" /* createdAt */]: () => cellDate({
|
|
13495
|
-
name: "createdAt",
|
|
13496
|
-
title: t(`common.date.create`)
|
|
13497
|
-
})
|
|
13498
|
-
};
|
|
13499
|
-
const columns = _react.useMemo.call(void 0, () => {
|
|
13500
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _376 => _376[field], 'optionalCall', _377 => _377()])).filter((col) => col !== void 0);
|
|
13501
|
-
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
13502
|
-
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
13503
|
-
}, "useUserTableStructure");
|
|
13504
|
-
|
|
13505
13717
|
// src/features/content/hooks/useContentTableStructure.tsx
|
|
13506
13718
|
|
|
13507
13719
|
|
|
@@ -13598,11 +13810,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
13598
13810
|
return params.fields.map((field) => {
|
|
13599
13811
|
const localHandler = fieldColumnMap[field];
|
|
13600
13812
|
if (localHandler) return localHandler();
|
|
13601
|
-
const customHandler = _optionalChain([params, 'access',
|
|
13813
|
+
const customHandler = _optionalChain([params, 'access', _385 => _385.context, 'optionalAccess', _386 => _386.customCells, 'optionalAccess', _387 => _387[field]]);
|
|
13602
13814
|
if (customHandler) return customHandler({ t });
|
|
13603
13815
|
return void 0;
|
|
13604
13816
|
}).filter((col) => col !== void 0);
|
|
13605
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
13817
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _388 => _388.context, 'optionalAccess', _389 => _389.customCells])]);
|
|
13606
13818
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
13607
13819
|
}, "useContentTableStructure");
|
|
13608
13820
|
|
|
@@ -13928,7 +14140,7 @@ function rbacReducer(state, action) {
|
|
|
13928
14140
|
}
|
|
13929
14141
|
case "SET_FEATURE_IS_CORE": {
|
|
13930
14142
|
const newMap = new Map(state.featureIsCore);
|
|
13931
|
-
const originalFeature = _optionalChain([state, 'access',
|
|
14143
|
+
const originalFeature = _optionalChain([state, 'access', _390 => _390.original, 'optionalAccess', _391 => _391.features, 'access', _392 => _392.find, 'call', _393 => _393((f) => f.id === action.featureId)]);
|
|
13932
14144
|
if (originalFeature && originalFeature.isCore === action.isCore) {
|
|
13933
14145
|
newMap.delete(action.featureId);
|
|
13934
14146
|
} else {
|
|
@@ -13939,7 +14151,7 @@ function rbacReducer(state, action) {
|
|
|
13939
14151
|
case "SET_MODULE_DEFAULT_PERMISSION": {
|
|
13940
14152
|
const newMap = new Map(state.modulePermissions);
|
|
13941
14153
|
const originalModule = state.original ? findModule(state.original.features, action.moduleId) : void 0;
|
|
13942
|
-
const current = _nullishCoalesce(newMap.get(action.moduleId), () => ( { ..._optionalChain([originalModule, 'optionalAccess',
|
|
14154
|
+
const current = _nullishCoalesce(newMap.get(action.moduleId), () => ( { ..._optionalChain([originalModule, 'optionalAccess', _394 => _394.permissions]) }));
|
|
13943
14155
|
const updated = { ...current, [action.actionType]: action.value };
|
|
13944
14156
|
newMap.set(action.moduleId, updated);
|
|
13945
14157
|
return { ...state, modulePermissions: newMap };
|
|
@@ -14030,8 +14242,8 @@ function useRbacState() {
|
|
|
14030
14242
|
const getFeatureIsCore = _react.useCallback.call(void 0,
|
|
14031
14243
|
(featureId) => {
|
|
14032
14244
|
if (state.featureIsCore.has(featureId)) return state.featureIsCore.get(featureId);
|
|
14033
|
-
const feature = _optionalChain([state, 'access',
|
|
14034
|
-
return _nullishCoalesce(_optionalChain([feature, 'optionalAccess',
|
|
14245
|
+
const feature = _optionalChain([state, 'access', _395 => _395.original, 'optionalAccess', _396 => _396.features, 'access', _397 => _397.find, 'call', _398 => _398((f) => f.id === featureId)]);
|
|
14246
|
+
return _nullishCoalesce(_optionalChain([feature, 'optionalAccess', _399 => _399.isCore]), () => ( false));
|
|
14035
14247
|
},
|
|
14036
14248
|
[state.featureIsCore, state.original]
|
|
14037
14249
|
);
|
|
@@ -14041,7 +14253,7 @@ function useRbacState() {
|
|
|
14041
14253
|
if (edited && edited[actionType] !== void 0) return edited[actionType];
|
|
14042
14254
|
if (!state.original) return void 0;
|
|
14043
14255
|
const mod = findModule(state.original.features, moduleId);
|
|
14044
|
-
return _optionalChain([mod, 'optionalAccess',
|
|
14256
|
+
return _optionalChain([mod, 'optionalAccess', _400 => _400.permissions, 'access', _401 => _401[actionType]]);
|
|
14045
14257
|
},
|
|
14046
14258
|
[state.modulePermissions, state.original]
|
|
14047
14259
|
);
|
|
@@ -14097,7 +14309,7 @@ function useRbacState() {
|
|
|
14097
14309
|
}, [state]);
|
|
14098
14310
|
const getModuleRelationshipPaths = _react.useCallback.call(void 0,
|
|
14099
14311
|
(moduleId) => {
|
|
14100
|
-
return _nullishCoalesce(_optionalChain([state, 'access',
|
|
14312
|
+
return _nullishCoalesce(_optionalChain([state, 'access', _402 => _402.original, 'optionalAccess', _403 => _403.moduleRelationshipPaths, 'access', _404 => _404.get, 'call', _405 => _405(moduleId)]), () => ( []));
|
|
14101
14313
|
},
|
|
14102
14314
|
[state.original]
|
|
14103
14315
|
);
|
|
@@ -14308,7 +14520,7 @@ function ContentTableSearch({ data }) {
|
|
|
14308
14520
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14309
14521
|
if (!isExpanded) {
|
|
14310
14522
|
setIsFocused(true);
|
|
14311
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
14523
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _406 => _406.current, 'optionalAccess', _407 => _407.focus, 'call', _408 => _408()]), 50);
|
|
14312
14524
|
}
|
|
14313
14525
|
}, "handleSearchIconClick");
|
|
14314
14526
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -14374,7 +14586,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
14374
14586
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
14375
14587
|
);
|
|
14376
14588
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
14377
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
14589
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _409 => _409.data]), () => ( EMPTY_ARRAY)),
|
|
14378
14590
|
fields,
|
|
14379
14591
|
checkedIds,
|
|
14380
14592
|
toggleId,
|
|
@@ -14443,12 +14655,12 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
14443
14655
|
) }),
|
|
14444
14656
|
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
|
|
14445
14657
|
const meta = header.column.columnDef.meta;
|
|
14446
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess',
|
|
14658
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _410 => _410.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
14447
14659
|
}) }, headerGroup.id))
|
|
14448
14660
|
] }),
|
|
14449
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
14661
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _411 => _411.rows, 'optionalAccess', _412 => _412.length]) ? rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
14450
14662
|
const meta = cell.column.columnDef.meta;
|
|
14451
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
14663
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _413 => _413.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
14452
14664
|
}) }, 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: "No results." }) }) }),
|
|
14453
14665
|
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: [
|
|
14454
14666
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -14458,7 +14670,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
14458
14670
|
size: "sm",
|
|
14459
14671
|
onClick: (e) => {
|
|
14460
14672
|
e.preventDefault();
|
|
14461
|
-
_optionalChain([data, 'access',
|
|
14673
|
+
_optionalChain([data, 'access', _414 => _414.previous, 'optionalCall', _415 => _415(true)]);
|
|
14462
14674
|
},
|
|
14463
14675
|
disabled: !data.previous,
|
|
14464
14676
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
|
|
@@ -14472,7 +14684,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
14472
14684
|
size: "sm",
|
|
14473
14685
|
onClick: (e) => {
|
|
14474
14686
|
e.preventDefault();
|
|
14475
|
-
_optionalChain([data, 'access',
|
|
14687
|
+
_optionalChain([data, 'access', _416 => _416.next, 'optionalCall', _417 => _417(true)]);
|
|
14476
14688
|
},
|
|
14477
14689
|
disabled: !data.next,
|
|
14478
14690
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
|
|
@@ -15195,7 +15407,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
15195
15407
|
newDigits[index] = digit;
|
|
15196
15408
|
setDigits(newDigits);
|
|
15197
15409
|
if (digit && index < 5) {
|
|
15198
|
-
_optionalChain([inputRefs, 'access',
|
|
15410
|
+
_optionalChain([inputRefs, 'access', _418 => _418.current, 'access', _419 => _419[index + 1], 'optionalAccess', _420 => _420.focus, 'call', _421 => _421()]);
|
|
15199
15411
|
}
|
|
15200
15412
|
const code = newDigits.join("");
|
|
15201
15413
|
if (code.length === 6 && newDigits.every((d) => d !== "")) {
|
|
@@ -15204,7 +15416,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
15204
15416
|
}, "handleChange");
|
|
15205
15417
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
|
|
15206
15418
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
15207
|
-
_optionalChain([inputRefs, 'access',
|
|
15419
|
+
_optionalChain([inputRefs, 'access', _422 => _422.current, 'access', _423 => _423[index - 1], 'optionalAccess', _424 => _424.focus, 'call', _425 => _425()]);
|
|
15208
15420
|
}
|
|
15209
15421
|
}, "handleKeyDown");
|
|
15210
15422
|
const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
@@ -15213,7 +15425,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
15213
15425
|
if (pastedData.length === 6) {
|
|
15214
15426
|
const newDigits = pastedData.split("");
|
|
15215
15427
|
setDigits(newDigits);
|
|
15216
|
-
_optionalChain([inputRefs, 'access',
|
|
15428
|
+
_optionalChain([inputRefs, 'access', _426 => _426.current, 'access', _427 => _427[5], 'optionalAccess', _428 => _428.focus, 'call', _429 => _429()]);
|
|
15217
15429
|
onComplete(pastedData);
|
|
15218
15430
|
}
|
|
15219
15431
|
}, "handlePaste");
|
|
@@ -15424,8 +15636,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
|
15424
15636
|
try {
|
|
15425
15637
|
const registrationData = await _chunkFKLP4NEDjs.TwoFactorService.getPasskeyRegistrationOptions({
|
|
15426
15638
|
id: _uuid.v4.call(void 0, ),
|
|
15427
|
-
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
15428
|
-
userDisplayName: _optionalChain([currentUser, 'optionalAccess',
|
|
15639
|
+
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _430 => _430.email]), () => ( "")),
|
|
15640
|
+
userDisplayName: _optionalChain([currentUser, 'optionalAccess', _431 => _431.name])
|
|
15429
15641
|
});
|
|
15430
15642
|
const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
|
|
15431
15643
|
await _chunkFKLP4NEDjs.TwoFactorService.verifyPasskeyRegistration({
|
|
@@ -15576,7 +15788,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
15576
15788
|
const setup = await _chunkFKLP4NEDjs.TwoFactorService.setupTotp({
|
|
15577
15789
|
id: _uuid.v4.call(void 0, ),
|
|
15578
15790
|
name: name.trim(),
|
|
15579
|
-
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
15791
|
+
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _432 => _432.email]), () => ( ""))
|
|
15580
15792
|
});
|
|
15581
15793
|
setQrCodeUri(setup.qrCodeUri);
|
|
15582
15794
|
setAuthenticatorId(setup.authenticatorId);
|
|
@@ -15710,7 +15922,7 @@ function TwoFactorSettings() {
|
|
|
15710
15922
|
if (isLoading) {
|
|
15711
15923
|
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") }) }) });
|
|
15712
15924
|
}
|
|
15713
|
-
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
15925
|
+
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _433 => _433.isEnabled]), () => ( false));
|
|
15714
15926
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
15715
15927
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
15716
15928
|
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" }),
|
|
@@ -15748,7 +15960,7 @@ function TwoFactorSettings() {
|
|
|
15748
15960
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
|
|
15749
15961
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
|
|
15750
15962
|
] }),
|
|
15751
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
15963
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _434 => _434.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
|
|
15752
15964
|
] }) }),
|
|
15753
15965
|
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
15754
15966
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
@@ -15926,9 +16138,9 @@ function AcceptInvitation() {
|
|
|
15926
16138
|
});
|
|
15927
16139
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
15928
16140
|
try {
|
|
15929
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
16141
|
+
if (!_optionalChain([params, 'optionalAccess', _435 => _435.code])) return;
|
|
15930
16142
|
const payload = {
|
|
15931
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
16143
|
+
code: _optionalChain([params, 'optionalAccess', _436 => _436.code]),
|
|
15932
16144
|
password: values.password
|
|
15933
16145
|
};
|
|
15934
16146
|
await _chunkFKLP4NEDjs.AuthService.acceptInvitation(payload);
|
|
@@ -16278,7 +16490,7 @@ function Logout({ storageKeys }) {
|
|
|
16278
16490
|
const generateUrl = usePageUrlGenerator();
|
|
16279
16491
|
_react.useEffect.call(void 0, () => {
|
|
16280
16492
|
const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
16281
|
-
if (_optionalChain([storageKeys, 'optionalAccess',
|
|
16493
|
+
if (_optionalChain([storageKeys, 'optionalAccess', _437 => _437.length])) {
|
|
16282
16494
|
clearClientStorage(storageKeys);
|
|
16283
16495
|
}
|
|
16284
16496
|
await _chunkFKLP4NEDjs.AuthService.logout();
|
|
@@ -16301,14 +16513,14 @@ function RefreshUser() {
|
|
|
16301
16513
|
setUser(fullUser);
|
|
16302
16514
|
const token = {
|
|
16303
16515
|
userId: fullUser.id,
|
|
16304
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
16516
|
+
companyId: _optionalChain([fullUser, 'access', _438 => _438.company, 'optionalAccess', _439 => _439.id]),
|
|
16305
16517
|
roles: fullUser.roles.map((role) => role.id),
|
|
16306
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
16518
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _440 => _440.company, 'optionalAccess', _441 => _441.features, 'optionalAccess', _442 => _442.map, 'call', _443 => _443((feature) => feature.id)]), () => ( [])),
|
|
16307
16519
|
modules: fullUser.modules.map((module) => {
|
|
16308
16520
|
return { id: module.id, permissions: module.permissions };
|
|
16309
16521
|
})
|
|
16310
16522
|
};
|
|
16311
|
-
await _optionalChain([_chunkFKLP4NEDjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
16523
|
+
await _optionalChain([_chunkFKLP4NEDjs.getTokenHandler.call(void 0, ), 'optionalAccess', _444 => _444.updateToken, 'call', _445 => _445(token)]);
|
|
16312
16524
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
16313
16525
|
}
|
|
16314
16526
|
}, "loadFullUser");
|
|
@@ -16372,9 +16584,9 @@ function ResetPassword() {
|
|
|
16372
16584
|
});
|
|
16373
16585
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
16374
16586
|
try {
|
|
16375
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
16587
|
+
if (!_optionalChain([params, 'optionalAccess', _446 => _446.code])) return;
|
|
16376
16588
|
const payload = {
|
|
16377
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
16589
|
+
code: _optionalChain([params, 'optionalAccess', _447 => _447.code]),
|
|
16378
16590
|
password: values.password
|
|
16379
16591
|
};
|
|
16380
16592
|
await _chunkFKLP4NEDjs.AuthService.resetPassword(payload);
|
|
@@ -16723,7 +16935,7 @@ function extractHeadings(blocks) {
|
|
|
16723
16935
|
function processBlocks(blockArray) {
|
|
16724
16936
|
for (const block of blockArray) {
|
|
16725
16937
|
if (block.type === "heading") {
|
|
16726
|
-
const level = _optionalChain([block, 'access',
|
|
16938
|
+
const level = _optionalChain([block, 'access', _448 => _448.props, 'optionalAccess', _449 => _449.level]) || 1;
|
|
16727
16939
|
const text = extractTextFromContent(block.content);
|
|
16728
16940
|
if (text.trim()) {
|
|
16729
16941
|
headings.push({
|
|
@@ -17066,7 +17278,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
17066
17278
|
})
|
|
17067
17279
|
};
|
|
17068
17280
|
const columns = _react.useMemo.call(void 0, () => {
|
|
17069
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
17281
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _450 => _450[field], 'optionalCall', _451 => _451()])).filter((col) => col !== void 0);
|
|
17070
17282
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
17071
17283
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
17072
17284
|
}, "useHowToTableStructure");
|
|
@@ -17110,8 +17322,6 @@ _chunk7QVYU63Ejs.__name.call(void 0, HowToListContainer, "HowToListContainer");
|
|
|
17110
17322
|
// src/features/how-to/components/forms/HowToMultiSelector.tsx
|
|
17111
17323
|
|
|
17112
17324
|
|
|
17113
|
-
|
|
17114
|
-
|
|
17115
17325
|
function HowToMultiSelector({
|
|
17116
17326
|
id,
|
|
17117
17327
|
form,
|
|
@@ -17119,89 +17329,25 @@ function HowToMultiSelector({
|
|
|
17119
17329
|
label,
|
|
17120
17330
|
placeholder,
|
|
17121
17331
|
onChange,
|
|
17122
|
-
maxCount = 3,
|
|
17123
17332
|
isRequired = false
|
|
17124
17333
|
}) {
|
|
17125
17334
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
17126
|
-
|
|
17127
|
-
|
|
17128
|
-
const selectedHowTos = _reacthookform.useWatch.call(void 0, { control: form.control, name: id }) || [];
|
|
17129
|
-
const data = useDataListRetriever({
|
|
17130
|
-
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkFKLP4NEDjs.HowToService.findMany(params), "retriever"),
|
|
17131
|
-
retrieverParams: {},
|
|
17132
|
-
ready: true,
|
|
17133
|
-
module: _chunkFKLP4NEDjs.Modules.HowTo
|
|
17134
|
-
});
|
|
17135
|
-
const updateSearch = _react.useCallback.call(void 0,
|
|
17136
|
-
(searchedTerm) => {
|
|
17137
|
-
if (searchedTerm.trim()) {
|
|
17138
|
-
data.addAdditionalParameter("search", searchedTerm.trim());
|
|
17139
|
-
} else {
|
|
17140
|
-
data.removeAdditionalParameter("search");
|
|
17141
|
-
}
|
|
17142
|
-
},
|
|
17143
|
-
[data]
|
|
17144
|
-
);
|
|
17145
|
-
const debouncedUpdateSearch = useDebounce2(updateSearch, 500);
|
|
17146
|
-
_react.useEffect.call(void 0, () => {
|
|
17147
|
-
debouncedUpdateSearch(searchTerm);
|
|
17148
|
-
}, [debouncedUpdateSearch, searchTerm]);
|
|
17149
|
-
_react.useEffect.call(void 0, () => {
|
|
17150
|
-
if (data.data && data.data.length > 0) {
|
|
17151
|
-
const howTos = data.data;
|
|
17152
|
-
const filteredHowTos = howTos.filter((howTo) => howTo.id !== _optionalChain([currentHowTo, 'optionalAccess', _445 => _445.id]));
|
|
17153
|
-
const options = filteredHowTos.map((howTo) => ({
|
|
17154
|
-
label: howTo.name,
|
|
17155
|
-
value: howTo.id,
|
|
17156
|
-
howToData: howTo
|
|
17157
|
-
}));
|
|
17158
|
-
const existingOptionIds = new Set(options.map((option) => option.value));
|
|
17159
|
-
const missingOptions = selectedHowTos.filter((howTo) => !existingOptionIds.has(howTo.id)).map((howTo) => ({
|
|
17160
|
-
label: howTo.name,
|
|
17161
|
-
value: howTo.id,
|
|
17162
|
-
howToData: howTo
|
|
17163
|
-
}));
|
|
17164
|
-
setHowToOptions([...options, ...missingOptions]);
|
|
17165
|
-
}
|
|
17166
|
-
}, [data.data, currentHowTo, selectedHowTos]);
|
|
17167
|
-
const selectedOptions = _react.useMemo.call(void 0, () => {
|
|
17168
|
-
return selectedHowTos.map((howTo) => ({
|
|
17169
|
-
value: howTo.id,
|
|
17170
|
-
label: howTo.name
|
|
17171
|
-
}));
|
|
17172
|
-
}, [selectedHowTos]);
|
|
17173
|
-
const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (options) => {
|
|
17174
|
-
const formValues = options.map((option) => ({
|
|
17175
|
-
id: option.value,
|
|
17176
|
-
name: option.label
|
|
17177
|
-
}));
|
|
17178
|
-
form.setValue(id, formValues, { shouldDirty: true, shouldTouch: true });
|
|
17179
|
-
if (onChange) {
|
|
17180
|
-
const fullData = options.map((option) => {
|
|
17181
|
-
const howToOption = howToOptions.find((opt) => opt.value === option.value);
|
|
17182
|
-
return _optionalChain([howToOption, 'optionalAccess', _446 => _446.howToData]);
|
|
17183
|
-
}).filter(Boolean);
|
|
17184
|
-
onChange(fullData);
|
|
17185
|
-
}
|
|
17186
|
-
}, "handleChange");
|
|
17187
|
-
const handleSearchSync = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (search) => {
|
|
17188
|
-
setSearchTerm(search);
|
|
17189
|
-
return howToOptions;
|
|
17190
|
-
}, "handleSearchSync");
|
|
17191
|
-
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.jsx.call(void 0,
|
|
17192
|
-
MultipleSelector,
|
|
17335
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17336
|
+
EntityMultiSelector,
|
|
17193
17337
|
{
|
|
17194
|
-
|
|
17195
|
-
|
|
17196
|
-
|
|
17197
|
-
placeholder,
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17338
|
+
id,
|
|
17339
|
+
form,
|
|
17340
|
+
label,
|
|
17341
|
+
placeholder: placeholder || t("ui.search.button"),
|
|
17342
|
+
emptyText: t("ui.search.no_results_generic"),
|
|
17343
|
+
isRequired,
|
|
17344
|
+
retriever: (params) => _chunkFKLP4NEDjs.HowToService.findMany(params),
|
|
17345
|
+
module: _chunkFKLP4NEDjs.Modules.HowTo,
|
|
17346
|
+
getLabel: (howTo) => howTo.name,
|
|
17347
|
+
excludeId: _optionalChain([currentHowTo, 'optionalAccess', _452 => _452.id]),
|
|
17348
|
+
onChange
|
|
17203
17349
|
}
|
|
17204
|
-
)
|
|
17350
|
+
);
|
|
17205
17351
|
}
|
|
17206
17352
|
_chunk7QVYU63Ejs.__name.call(void 0, HowToMultiSelector, "HowToMultiSelector");
|
|
17207
17353
|
|
|
@@ -17263,7 +17409,7 @@ function HowToSelector({
|
|
|
17263
17409
|
}, "setHowTo");
|
|
17264
17410
|
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: [
|
|
17265
17411
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
17266
|
-
/* @__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',
|
|
17412
|
+
/* @__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', _453 => _453.value, 'optionalAccess', _454 => _454.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 }) }))) }) }) }),
|
|
17267
17413
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17268
17414
|
_lucidereact.CircleX,
|
|
17269
17415
|
{
|
|
@@ -17372,14 +17518,14 @@ function NotificationsList({ archived }) {
|
|
|
17372
17518
|
] }),
|
|
17373
17519
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
|
|
17374
17520
|
] }) }) }, i)) }), "LoadingSkeleton");
|
|
17375
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access',
|
|
17521
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _455 => _455.data, 'optionalAccess', _456 => _456.map, 'call', _457 => _457((notification) => {
|
|
17376
17522
|
const notificationData = generateNotificationData({ notification, generateUrl });
|
|
17377
17523
|
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: [
|
|
17378
17524
|
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: _chunkFKLP4NEDjs.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" }),
|
|
17379
17525
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
17380
17526
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
17381
17527
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
17382
|
-
actor: _nullishCoalesce(_optionalChain([notificationData, 'access',
|
|
17528
|
+
actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _458 => _458.actor, 'optionalAccess', _459 => _459.name]), () => ( "")),
|
|
17383
17529
|
title: notificationData.title
|
|
17384
17530
|
}) }),
|
|
17385
17531
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
|
|
@@ -17729,7 +17875,7 @@ var DEFAULT_TRANSLATIONS = {
|
|
|
17729
17875
|
invalidEmail: "Please enter a valid email address"
|
|
17730
17876
|
};
|
|
17731
17877
|
async function copyToClipboard(text) {
|
|
17732
|
-
if (_optionalChain([navigator, 'access',
|
|
17878
|
+
if (_optionalChain([navigator, 'access', _460 => _460.clipboard, 'optionalAccess', _461 => _461.writeText])) {
|
|
17733
17879
|
try {
|
|
17734
17880
|
await navigator.clipboard.writeText(text);
|
|
17735
17881
|
return true;
|
|
@@ -17771,7 +17917,7 @@ function ReferralWidget({
|
|
|
17771
17917
|
const linkInputRef = _react.useRef.call(void 0, null);
|
|
17772
17918
|
const config = _chunkOTZEXASKjs.getReferralConfig.call(void 0, );
|
|
17773
17919
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
17774
|
-
const referralUrl = _optionalChain([stats, 'optionalAccess',
|
|
17920
|
+
const referralUrl = _optionalChain([stats, 'optionalAccess', _462 => _462.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
17775
17921
|
if (!_chunkOTZEXASKjs.isReferralEnabled.call(void 0, )) {
|
|
17776
17922
|
return null;
|
|
17777
17923
|
}
|
|
@@ -17781,7 +17927,7 @@ function ReferralWidget({
|
|
|
17781
17927
|
if (success) {
|
|
17782
17928
|
setCopied(true);
|
|
17783
17929
|
_chunkFKLP4NEDjs.showToast.call(void 0, t.copiedMessage);
|
|
17784
|
-
_optionalChain([onLinkCopied, 'optionalCall',
|
|
17930
|
+
_optionalChain([onLinkCopied, 'optionalCall', _463 => _463()]);
|
|
17785
17931
|
setTimeout(() => setCopied(false), 2e3);
|
|
17786
17932
|
} else {
|
|
17787
17933
|
_chunkFKLP4NEDjs.showError.call(void 0, t.copyError);
|
|
@@ -17795,12 +17941,12 @@ function ReferralWidget({
|
|
|
17795
17941
|
try {
|
|
17796
17942
|
await sendInvite(email);
|
|
17797
17943
|
_chunkFKLP4NEDjs.showToast.call(void 0, t.inviteSent);
|
|
17798
|
-
_optionalChain([onInviteSent, 'optionalCall',
|
|
17944
|
+
_optionalChain([onInviteSent, 'optionalCall', _464 => _464(email)]);
|
|
17799
17945
|
setEmail("");
|
|
17800
17946
|
} catch (err) {
|
|
17801
17947
|
const error2 = err instanceof Error ? err : new Error(t.inviteError);
|
|
17802
17948
|
_chunkFKLP4NEDjs.showError.call(void 0, error2.message);
|
|
17803
|
-
_optionalChain([onInviteError, 'optionalCall',
|
|
17949
|
+
_optionalChain([onInviteError, 'optionalCall', _465 => _465(error2)]);
|
|
17804
17950
|
}
|
|
17805
17951
|
}, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
|
|
17806
17952
|
const handleEmailKeyDown = _react.useCallback.call(void 0,
|
|
@@ -18554,7 +18700,7 @@ function OAuthClientList({
|
|
|
18554
18700
|
OAuthClientCard,
|
|
18555
18701
|
{
|
|
18556
18702
|
client,
|
|
18557
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
18703
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _466 => _466(client)]),
|
|
18558
18704
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
18559
18705
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
18560
18706
|
},
|
|
@@ -18570,11 +18716,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
|
|
|
18570
18716
|
function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
|
|
18571
18717
|
const isEditMode = !!client;
|
|
18572
18718
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
18573
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
18574
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
18575
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
18576
|
-
allowedScopes: _optionalChain([client, 'optionalAccess',
|
|
18577
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
18719
|
+
name: _optionalChain([client, 'optionalAccess', _467 => _467.name]) || "",
|
|
18720
|
+
description: _optionalChain([client, 'optionalAccess', _468 => _468.description]) || "",
|
|
18721
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _469 => _469.redirectUris, 'optionalAccess', _470 => _470.length]) ? client.redirectUris : [""],
|
|
18722
|
+
allowedScopes: _optionalChain([client, 'optionalAccess', _471 => _471.allowedScopes]) || [],
|
|
18723
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _472 => _472.isConfidential]), () => ( true))
|
|
18578
18724
|
});
|
|
18579
18725
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
18580
18726
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -18802,7 +18948,7 @@ function OAuthClientDetail({
|
|
|
18802
18948
|
] }),
|
|
18803
18949
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
18804
18950
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
|
|
18805
|
-
/* @__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([_chunkFKLP4NEDjs.OAUTH_SCOPE_DISPLAY, 'access',
|
|
18951
|
+
/* @__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([_chunkFKLP4NEDjs.OAUTH_SCOPE_DISPLAY, 'access', _473 => _473[scope], 'optionalAccess', _474 => _474.name]) || scope }, scope)) })
|
|
18806
18952
|
] }),
|
|
18807
18953
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
18808
18954
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
|
|
@@ -18946,7 +19092,7 @@ function OAuthConsentScreen({
|
|
|
18946
19092
|
if (error || !clientInfo) {
|
|
18947
19093
|
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: [
|
|
18948
19094
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
18949
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
19095
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _475 => _475.message]) || "Invalid authorization request. Please try again." })
|
|
18950
19096
|
] }) }) }) });
|
|
18951
19097
|
}
|
|
18952
19098
|
const { client, scopes } = clientInfo;
|
|
@@ -19162,7 +19308,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
19162
19308
|
questionnaire: values.questionnaire
|
|
19163
19309
|
});
|
|
19164
19310
|
setIsSuccess(true);
|
|
19165
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
19311
|
+
_optionalChain([onSuccess, 'optionalCall', _476 => _476()]);
|
|
19166
19312
|
} catch (e) {
|
|
19167
19313
|
errorToast({ error: e });
|
|
19168
19314
|
} finally {
|
|
@@ -19785,7 +19931,7 @@ function RbacModuleTable({ module, roles, stateApi }) {
|
|
|
19785
19931
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: role.name }),
|
|
19786
19932
|
_chunkOTZEXASKjs.ACTION_TYPES.map((actionType) => {
|
|
19787
19933
|
const roleValue = stateApi.getRolePermission(role.id, module.id, actionType);
|
|
19788
|
-
const originalMapping = _optionalChain([stateApi, 'access',
|
|
19934
|
+
const originalMapping = _optionalChain([stateApi, 'access', _477 => _477.original, 'optionalAccess', _478 => _478.permissionMappings, 'access', _479 => _479.find, 'call', _480 => _480(
|
|
19789
19935
|
(pm) => pm.roleId === role.id && pm.moduleId === module.id
|
|
19790
19936
|
)]);
|
|
19791
19937
|
const originalRoleValue = originalMapping ? _nullishCoalesce(originalMapping.permissions[actionType], () => ( null)) : void 0;
|
|
@@ -20423,5 +20569,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacContainer, "RbacContainer");
|
|
|
20423
20569
|
|
|
20424
20570
|
|
|
20425
20571
|
|
|
20426
|
-
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.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.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.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.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.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.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.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorTrigger = CommonEditorTrigger; 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.FormFieldWrapper = FormFieldWrapper; 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.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; 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.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToSelector = HowToSelector; 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.useRbacState = useRbacState; exports.generateMigrationFile = generateMigrationFile; exports.downloadMigrationFile = downloadMigrationFile; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacModuleTable = RbacModuleTable; exports.RbacFeatureSection = RbacFeatureSection; exports.RbacToolbar = RbacToolbar; exports.RbacContainer = RbacContainer; 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.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
|
|
20427
|
-
|
|
20572
|
+
|
|
20573
|
+
|
|
20574
|
+
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.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.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.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.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.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.BlockNoteEditorContainer = BlockNoteEditorContainer; 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.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.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.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; 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.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToSelector = HowToSelector; 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.useRbacState = useRbacState; exports.generateMigrationFile = generateMigrationFile; exports.downloadMigrationFile = downloadMigrationFile; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacModuleTable = RbacModuleTable; exports.RbacFeatureSection = RbacFeatureSection; exports.RbacToolbar = RbacToolbar; exports.RbacContainer = RbacContainer; 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;
|
|
20575
|
+
//# sourceMappingURL=chunk-4C5ZDJV6.js.map
|