@helpwave/hightide 0.1.7 → 0.1.9
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/components/branding/HelpwaveBadge.js +30 -8
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +30 -8
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/date/DatePicker.d.mts +3 -4
- package/dist/components/date/DatePicker.d.ts +3 -4
- package/dist/components/date/DatePicker.js +135 -33
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +135 -33
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.d.mts +1 -1
- package/dist/components/date/DayPicker.d.ts +1 -1
- package/dist/components/date/DayPicker.js +23 -11
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +23 -11
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.d.mts +5 -19
- package/dist/components/date/TimeDisplay.d.ts +5 -19
- package/dist/components/date/TimeDisplay.js +121 -37
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +121 -37
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +106 -22
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +106 -22
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.d.mts +2 -5
- package/dist/components/dialogs/ConfirmDialog.d.ts +2 -5
- package/dist/components/dialogs/ConfirmDialog.js +157 -25
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +157 -25
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.js +2 -2
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.d.mts +1 -1
- package/dist/components/layout-and-navigation/Carousel.d.ts +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +86 -28
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +86 -28
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.mts +3 -0
- package/dist/components/layout-and-navigation/Expandable.d.ts +3 -0
- package/dist/components/layout-and-navigation/Expandable.js +4 -3
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.mjs +4 -3
- package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +4 -3
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs +4 -3
- package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.d.mts +2 -3
- package/dist/components/layout-and-navigation/Overlay.d.ts +2 -3
- package/dist/components/layout-and-navigation/Overlay.js +152 -12
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +152 -12
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.d.mts +2 -3
- package/dist/components/layout-and-navigation/Pagination.d.ts +2 -3
- package/dist/components/layout-and-navigation/Pagination.js +145 -13
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +145 -13
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.d.mts +10 -8
- package/dist/components/layout-and-navigation/SearchableList.d.ts +10 -8
- package/dist/components/layout-and-navigation/SearchableList.js +261 -30
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +261 -30
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.d.mts +2 -5
- package/dist/components/layout-and-navigation/StepperBar.d.ts +2 -5
- package/dist/components/layout-and-navigation/StepperBar.js +149 -19
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +149 -19
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +146 -14
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.mjs +146 -14
- package/dist/components/layout-and-navigation/Table.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.d.mts +3 -4
- package/dist/components/layout-and-navigation/TextImage.d.ts +3 -4
- package/dist/components/layout-and-navigation/TextImage.js +153 -19
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +153 -19
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Tile.d.mts +10 -15
- package/dist/components/layout-and-navigation/Tile.d.ts +10 -15
- package/dist/components/layout-and-navigation/Tile.js +30 -8
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.mjs +30 -8
- package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js +48 -8
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +48 -8
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -0
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -0
- package/dist/components/loading-states/LoadingAndErrorComponent.js +147 -15
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +147 -15
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.d.mts +2 -3
- package/dist/components/loading-states/LoadingAnimation.d.ts +2 -3
- package/dist/components/loading-states/LoadingAnimation.js +145 -13
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +145 -13
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/ProgressIndicator.js +2 -2
- package/dist/components/loading-states/ProgressIndicator.js.map +1 -1
- package/dist/components/loading-states/ProgressIndicator.mjs +2 -2
- package/dist/components/loading-states/ProgressIndicator.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.d.mts +2 -5
- package/dist/components/modals/ConfirmModal.d.ts +2 -5
- package/dist/components/modals/ConfirmModal.js +158 -28
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +158 -28
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.d.mts +2 -7
- package/dist/components/modals/DiscardChangesModal.d.ts +2 -7
- package/dist/components/modals/DiscardChangesModal.js +162 -48
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +162 -48
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.d.mts +1 -0
- package/dist/components/modals/InputModal.d.ts +1 -0
- package/dist/components/modals/InputModal.js +158 -28
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +158 -28
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.d.mts +3 -2
- package/dist/components/modals/LanguageModal.d.ts +3 -2
- package/dist/components/modals/LanguageModal.js +538 -166
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +537 -165
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.d.mts +5 -5
- package/dist/components/modals/ThemeModal.d.ts +5 -5
- package/dist/components/modals/ThemeModal.js +547 -176
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +544 -173
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.d.mts +3 -5
- package/dist/components/properties/CheckboxProperty.d.ts +3 -5
- package/dist/components/properties/CheckboxProperty.js +148 -26
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +148 -26
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.d.mts +1 -0
- package/dist/components/properties/DateProperty.d.ts +1 -0
- package/dist/components/properties/DateProperty.js +146 -14
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +146 -14
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +5 -5
- package/dist/components/properties/MultiSelectProperty.d.ts +5 -5
- package/dist/components/properties/MultiSelectProperty.js +626 -456
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +622 -452
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.d.mts +1 -0
- package/dist/components/properties/NumberProperty.d.ts +1 -0
- package/dist/components/properties/NumberProperty.js +148 -16
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +148 -16
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.d.mts +2 -3
- package/dist/components/properties/PropertyBase.d.ts +2 -3
- package/dist/components/properties/PropertyBase.js +146 -14
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +146 -14
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +5 -6
- package/dist/components/properties/SelectProperty.d.ts +5 -6
- package/dist/components/properties/SelectProperty.js +542 -279
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +542 -279
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.d.mts +2 -1
- package/dist/components/properties/TextProperty.d.ts +2 -1
- package/dist/components/properties/TextProperty.js +150 -18
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +150 -18
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.d.mts +4 -20
- package/dist/components/user-action/DateAndTimePicker.d.ts +4 -20
- package/dist/components/user-action/DateAndTimePicker.js +233 -71
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +233 -71
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Menu.d.mts +14 -8
- package/dist/components/user-action/Menu.d.ts +14 -8
- package/dist/components/user-action/Menu.js +32 -11
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +32 -11
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +13 -23
- package/dist/components/user-action/MultiSelect.d.ts +13 -23
- package/dist/components/user-action/MultiSelect.js +632 -325
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +629 -323
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.d.mts +5 -18
- package/dist/components/user-action/Select.d.ts +5 -18
- package/dist/components/user-action/Select.js +447 -113
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +442 -107
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Tooltip.js +2 -2
- package/dist/components/user-action/Tooltip.js.map +1 -1
- package/dist/components/user-action/Tooltip.mjs +2 -2
- package/dist/components/user-action/Tooltip.mjs.map +1 -1
- package/dist/css/globals.css +224 -207
- package/dist/css/uncompiled/globals.css +138 -74
- package/dist/hooks/useSearch.d.mts +17 -0
- package/dist/hooks/useSearch.d.ts +17 -0
- package/dist/hooks/useSearch.js +66 -0
- package/dist/hooks/useSearch.js.map +1 -0
- package/dist/hooks/useSearch.mjs +42 -0
- package/dist/hooks/useSearch.mjs.map +1 -0
- package/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +882 -758
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +836 -717
- package/dist/index.mjs.map +1 -1
- package/dist/localization/defaults/form.d.mts +54 -0
- package/dist/localization/defaults/form.d.ts +54 -0
- package/dist/localization/defaults/form.js +127 -0
- package/dist/localization/defaults/form.js.map +1 -0
- package/dist/localization/defaults/form.mjs +103 -0
- package/dist/localization/defaults/form.mjs.map +1 -0
- package/dist/localization/defaults/time.d.mts +39 -0
- package/dist/localization/defaults/time.d.ts +39 -0
- package/dist/localization/defaults/time.js +101 -0
- package/dist/localization/defaults/time.js.map +1 -0
- package/dist/localization/defaults/time.mjs +76 -0
- package/dist/localization/defaults/time.mjs.map +1 -0
- package/dist/localization/useTranslation.d.mts +30 -6
- package/dist/localization/useTranslation.d.ts +30 -6
- package/dist/localization/useTranslation.js +46 -6
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +46 -6
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.d.mts +4 -2
- package/dist/theming/useTheme.d.ts +4 -2
- package/dist/theming/useTheme.js +10 -2
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +10 -2
- package/dist/theming/useTheme.mjs.map +1 -1
- package/dist/util/PropsWithFunctionChildren.d.mts +14 -0
- package/dist/util/PropsWithFunctionChildren.d.ts +14 -0
- package/dist/util/PropsWithFunctionChildren.js +38 -0
- package/dist/util/PropsWithFunctionChildren.js.map +1 -0
- package/dist/util/PropsWithFunctionChildren.mjs +14 -0
- package/dist/util/PropsWithFunctionChildren.mjs.map +1 -0
- package/dist/util/simpleSearch.d.mts +2 -2
- package/dist/util/simpleSearch.d.ts +2 -2
- package/dist/util/simpleSearch.js +4 -1
- package/dist/util/simpleSearch.js.map +1 -1
- package/dist/util/simpleSearch.mjs +4 -1
- package/dist/util/simpleSearch.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -2887,22 +2887,44 @@ import clsx3 from "clsx";
|
|
|
2887
2887
|
|
|
2888
2888
|
// src/components/layout-and-navigation/Tile.tsx
|
|
2889
2889
|
import clsx from "clsx";
|
|
2890
|
+
import { Check } from "lucide-react";
|
|
2890
2891
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2891
2892
|
var Tile = ({
|
|
2892
2893
|
title,
|
|
2893
2894
|
description,
|
|
2895
|
+
onClick,
|
|
2896
|
+
isSelected = false,
|
|
2897
|
+
isDisabled = false,
|
|
2894
2898
|
prefix,
|
|
2895
2899
|
suffix,
|
|
2900
|
+
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
2901
|
+
selectedClassName = " bg-primary/20",
|
|
2902
|
+
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
2896
2903
|
className
|
|
2897
2904
|
}) => {
|
|
2898
|
-
return /* @__PURE__ */ jsxs(
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2905
|
+
return /* @__PURE__ */ jsxs(
|
|
2906
|
+
"div",
|
|
2907
|
+
{
|
|
2908
|
+
className: clsx(
|
|
2909
|
+
"row gap-x-2 w-full items-center",
|
|
2910
|
+
{
|
|
2911
|
+
[normalClassName]: !!onClick && !isDisabled,
|
|
2912
|
+
[selectedClassName]: isSelected && !isDisabled,
|
|
2913
|
+
[disabledClassName]: isDisabled
|
|
2914
|
+
},
|
|
2915
|
+
className
|
|
2916
|
+
),
|
|
2917
|
+
onClick: isDisabled ? void 0 : onClick,
|
|
2918
|
+
children: [
|
|
2919
|
+
prefix ?? (isSelected ? /* @__PURE__ */ jsx(Check, { size: 24 }) : void 0),
|
|
2920
|
+
/* @__PURE__ */ jsxs("div", { className: "col gap-y-0 w-full", children: [
|
|
2921
|
+
/* @__PURE__ */ jsx("h4", { className: clsx(title.className ?? "textstyle-title-normal"), children: title.value }),
|
|
2922
|
+
!!description && /* @__PURE__ */ jsx("span", { className: clsx(description.className ?? "textstyle-description"), children: description.value })
|
|
2923
|
+
] }),
|
|
2924
|
+
suffix
|
|
2925
|
+
]
|
|
2926
|
+
}
|
|
2927
|
+
);
|
|
2906
2928
|
};
|
|
2907
2929
|
|
|
2908
2930
|
// src/components/icons-and-geometry/Helpwave.tsx
|
|
@@ -3126,15 +3148,55 @@ var LanguageProvider = ({ initialLanguage, children }) => {
|
|
|
3126
3148
|
};
|
|
3127
3149
|
|
|
3128
3150
|
// src/localization/useTranslation.ts
|
|
3129
|
-
var useTranslation = (
|
|
3130
|
-
const { language: languageProp, translation: overwrite } =
|
|
3151
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
3152
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
3131
3153
|
const { language: inferredLanguage } = useLanguage();
|
|
3132
3154
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
3133
|
-
|
|
3134
|
-
if (overwrite
|
|
3135
|
-
|
|
3136
|
-
}
|
|
3137
|
-
return
|
|
3155
|
+
const usedTranslations = [...translations];
|
|
3156
|
+
if (overwrite) {
|
|
3157
|
+
usedTranslations.push(overwrite);
|
|
3158
|
+
}
|
|
3159
|
+
return (key, options) => {
|
|
3160
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
3161
|
+
try {
|
|
3162
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
3163
|
+
const translation = translations[i];
|
|
3164
|
+
const localizedTranslation = translation[usedLanguage];
|
|
3165
|
+
if (!localizedTranslation) {
|
|
3166
|
+
continue;
|
|
3167
|
+
}
|
|
3168
|
+
const value = localizedTranslation[key];
|
|
3169
|
+
if (!value) {
|
|
3170
|
+
continue;
|
|
3171
|
+
}
|
|
3172
|
+
let forProcessing;
|
|
3173
|
+
if (typeof value !== "string") {
|
|
3174
|
+
if (count <= 0 && value?.zero) {
|
|
3175
|
+
forProcessing = value.zero;
|
|
3176
|
+
} else if (count === 1 && value?.one) {
|
|
3177
|
+
forProcessing = value.one;
|
|
3178
|
+
} else if (count === 2 && value?.two) {
|
|
3179
|
+
forProcessing = value.two;
|
|
3180
|
+
} else if (count <= 10 && value?.few) {
|
|
3181
|
+
forProcessing = value.few;
|
|
3182
|
+
} else if (count > 10 && value?.many) {
|
|
3183
|
+
forProcessing = value.many;
|
|
3184
|
+
} else {
|
|
3185
|
+
forProcessing = value.other;
|
|
3186
|
+
}
|
|
3187
|
+
} else {
|
|
3188
|
+
forProcessing = value;
|
|
3189
|
+
}
|
|
3190
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
3191
|
+
return replacements[placeholder] ?? `{{${placeholder}}}`;
|
|
3192
|
+
});
|
|
3193
|
+
return forProcessing;
|
|
3194
|
+
}
|
|
3195
|
+
} catch (e) {
|
|
3196
|
+
console.error(e);
|
|
3197
|
+
}
|
|
3198
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
3199
|
+
};
|
|
3138
3200
|
};
|
|
3139
3201
|
|
|
3140
3202
|
// src/util/noop.ts
|
|
@@ -3627,8 +3689,9 @@ var Expandable = forwardRef(function Expandable2({
|
|
|
3627
3689
|
onChange = noop,
|
|
3628
3690
|
clickOnlyOnHeader = true,
|
|
3629
3691
|
disabled = false,
|
|
3630
|
-
className
|
|
3631
|
-
headerClassName
|
|
3692
|
+
className,
|
|
3693
|
+
headerClassName,
|
|
3694
|
+
contentClassName
|
|
3632
3695
|
}, ref) {
|
|
3633
3696
|
icon ??= DefaultIcon;
|
|
3634
3697
|
return /* @__PURE__ */ jsxs4(
|
|
@@ -3657,7 +3720,7 @@ var Expandable = forwardRef(function Expandable2({
|
|
|
3657
3720
|
]
|
|
3658
3721
|
}
|
|
3659
3722
|
),
|
|
3660
|
-
isExpanded && /* @__PURE__ */ jsx6("div", { className: "col px-4 pb-2", children })
|
|
3723
|
+
isExpanded && /* @__PURE__ */ jsx6("div", { className: clsx5("col px-4 pb-2", contentClassName), children })
|
|
3661
3724
|
]
|
|
3662
3725
|
}
|
|
3663
3726
|
);
|
|
@@ -3722,7 +3785,8 @@ var YearMonthPicker = ({
|
|
|
3722
3785
|
ref: (displayedYearMonth.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()) === year ? ref : void 0,
|
|
3723
3786
|
label: /* @__PURE__ */ jsx7("span", { className: clsx6({ "text-primary font-bold": selectedYear }), children: year }),
|
|
3724
3787
|
isExpanded: showValueOpen && selectedYear,
|
|
3725
|
-
|
|
3788
|
+
contentClassName: "gap-y-1",
|
|
3789
|
+
children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx7("div", { className: "row gap-x-1", children: monthList.map((month) => {
|
|
3726
3790
|
const monthIndex = monthsList.indexOf(month);
|
|
3727
3791
|
const newDate = new Date(year, monthIndex);
|
|
3728
3792
|
const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
|
|
@@ -3732,17 +3796,12 @@ var YearMonthPicker = ({
|
|
|
3732
3796
|
const isBeforeEnd = end === void 0 || firstOfMonth <= end;
|
|
3733
3797
|
const isValid = isAfterStart && isBeforeEnd;
|
|
3734
3798
|
return /* @__PURE__ */ jsx7(
|
|
3735
|
-
|
|
3799
|
+
SolidButton,
|
|
3736
3800
|
{
|
|
3737
3801
|
disabled: !isValid,
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
"bg-gray-50 text-black": !selectedMonth && isValid,
|
|
3742
|
-
"bg-primary text-on-primary": selectedMonth && isValid,
|
|
3743
|
-
"bg-disabled-background text-disabled-text": !isValid
|
|
3744
|
-
}
|
|
3745
|
-
),
|
|
3802
|
+
color: selectedMonth && isValid ? "primary" : "neutral",
|
|
3803
|
+
className: "flex-1",
|
|
3804
|
+
size: "small",
|
|
3746
3805
|
onClick: () => {
|
|
3747
3806
|
onChange(newDate);
|
|
3748
3807
|
},
|
|
@@ -3757,11 +3816,11 @@ var YearMonthPicker = ({
|
|
|
3757
3816
|
}) }) }) });
|
|
3758
3817
|
};
|
|
3759
3818
|
var YearMonthPickerUncontrolled = ({
|
|
3760
|
-
displayedYearMonth
|
|
3819
|
+
displayedYearMonth,
|
|
3761
3820
|
onChange = noop,
|
|
3762
3821
|
...props
|
|
3763
3822
|
}) => {
|
|
3764
|
-
const [yearMonth, setYearMonth] = useState4(displayedYearMonth);
|
|
3823
|
+
const [yearMonth, setYearMonth] = useState4(displayedYearMonth ?? /* @__PURE__ */ new Date());
|
|
3765
3824
|
useEffect4(() => setYearMonth(displayedYearMonth), [displayedYearMonth]);
|
|
3766
3825
|
return /* @__PURE__ */ jsx7(
|
|
3767
3826
|
YearMonthPicker,
|
|
@@ -3805,14 +3864,15 @@ var DayPicker = ({
|
|
|
3805
3864
|
{
|
|
3806
3865
|
disabled: !isDayValid,
|
|
3807
3866
|
className: clsx7(
|
|
3808
|
-
"flex-1 rounded-full border-2
|
|
3867
|
+
"flex-1 rounded-full border-2",
|
|
3809
3868
|
{
|
|
3810
|
-
"text-
|
|
3811
|
-
"text-
|
|
3812
|
-
"text-
|
|
3813
|
-
"
|
|
3814
|
-
"
|
|
3815
|
-
"
|
|
3869
|
+
"text-description": !isSameMonth && !isSelected && isDayValid,
|
|
3870
|
+
"text-button-solid-neutral-text bg-button-solid-neutral-background": !isSelected && isSameMonth && isDayValid,
|
|
3871
|
+
"text-button-solid-primary-text bg-button-solid-primary-background": isSelected && isDayValid,
|
|
3872
|
+
"hover:brightness-90 hover:bg-button-solid-primary-background hover:text-button-solid-primary-text": isDayValid,
|
|
3873
|
+
"text-disabled-text bg-disabled-background cursor-not-allowed": !isDayValid,
|
|
3874
|
+
"border-secondary": isToday && markToday,
|
|
3875
|
+
"border-transparent": !isToday || !markToday
|
|
3816
3876
|
}
|
|
3817
3877
|
),
|
|
3818
3878
|
onClick: () => onChange(date),
|
|
@@ -3823,15 +3883,26 @@ var DayPicker = ({
|
|
|
3823
3883
|
}) }, index))
|
|
3824
3884
|
] });
|
|
3825
3885
|
};
|
|
3826
|
-
var DayPickerUncontrolled = ({
|
|
3827
|
-
|
|
3828
|
-
|
|
3886
|
+
var DayPickerUncontrolled = ({
|
|
3887
|
+
displayedMonth,
|
|
3888
|
+
selected,
|
|
3889
|
+
onChange = noop,
|
|
3890
|
+
...restProps
|
|
3891
|
+
}) => {
|
|
3892
|
+
const [date, setDate] = useState5(selected);
|
|
3893
|
+
const [usedDisplayedMonth, setUsedDDisplayedMonth] = useState5(displayedMonth);
|
|
3894
|
+
useEffect5(() => {
|
|
3895
|
+
setDate(selected);
|
|
3896
|
+
setUsedDDisplayedMonth(selected);
|
|
3897
|
+
}, [selected]);
|
|
3829
3898
|
return /* @__PURE__ */ jsx8(
|
|
3830
3899
|
DayPicker,
|
|
3831
3900
|
{
|
|
3832
|
-
displayedMonth:
|
|
3901
|
+
displayedMonth: usedDisplayedMonth,
|
|
3902
|
+
selected: date,
|
|
3833
3903
|
onChange: (newDate) => {
|
|
3834
3904
|
setDate(newDate);
|
|
3905
|
+
setUsedDDisplayedMonth(newDate);
|
|
3835
3906
|
onChange(newDate);
|
|
3836
3907
|
},
|
|
3837
3908
|
...restProps
|
|
@@ -3839,16 +3910,80 @@ var DayPickerUncontrolled = ({ displayedMonth, onChange = noop, ...restProps })
|
|
|
3839
3910
|
);
|
|
3840
3911
|
};
|
|
3841
3912
|
|
|
3842
|
-
// src/
|
|
3843
|
-
|
|
3844
|
-
|
|
3913
|
+
// src/localization/defaults/time.ts
|
|
3914
|
+
var monthTranslation = {
|
|
3915
|
+
en: {
|
|
3916
|
+
january: "January",
|
|
3917
|
+
february: "Febuary",
|
|
3918
|
+
march: "March",
|
|
3919
|
+
april: "April",
|
|
3920
|
+
may: "May",
|
|
3921
|
+
june: "June",
|
|
3922
|
+
july: "July",
|
|
3923
|
+
august: "August",
|
|
3924
|
+
september: "September",
|
|
3925
|
+
october: "October",
|
|
3926
|
+
november: "November",
|
|
3927
|
+
december: "December"
|
|
3928
|
+
},
|
|
3929
|
+
de: {
|
|
3930
|
+
january: "Januar",
|
|
3931
|
+
february: "Febuar",
|
|
3932
|
+
march: "M\xE4rz",
|
|
3933
|
+
april: "April",
|
|
3934
|
+
may: "Mai",
|
|
3935
|
+
june: "Juni",
|
|
3936
|
+
july: "Juli",
|
|
3937
|
+
august: "August",
|
|
3938
|
+
september: "September",
|
|
3939
|
+
october: "October",
|
|
3940
|
+
november: "November",
|
|
3941
|
+
december: "December"
|
|
3942
|
+
}
|
|
3943
|
+
};
|
|
3944
|
+
var timeTranslation = {
|
|
3845
3945
|
en: {
|
|
3846
|
-
|
|
3946
|
+
...monthTranslation.en,
|
|
3947
|
+
century: { one: "Century", other: "Centuries" },
|
|
3948
|
+
decade: { one: "Decade", other: "Decades" },
|
|
3949
|
+
year: { one: "Year", other: "Years" },
|
|
3950
|
+
month: { one: "Month", other: "Months" },
|
|
3951
|
+
day: { one: "Day", other: "Days" },
|
|
3952
|
+
hour: { one: "Hour", other: "Hours" },
|
|
3953
|
+
minute: { one: "Minute", other: "Minutes" },
|
|
3954
|
+
second: { one: "Second", other: "Seconds" },
|
|
3955
|
+
millisecond: { one: "Millisecond", other: "Milliseconds" },
|
|
3956
|
+
microsecond: { one: "Microsecond", other: "Microseconds" },
|
|
3957
|
+
nanosecond: { one: "Nanosecond", other: "Nanoseconds" },
|
|
3958
|
+
yesterday: "Yesterday",
|
|
3959
|
+
today: "Today",
|
|
3960
|
+
tomorrow: "Tomorrow",
|
|
3961
|
+
in: "in",
|
|
3962
|
+
ago: "ago"
|
|
3847
3963
|
},
|
|
3848
3964
|
de: {
|
|
3849
|
-
|
|
3965
|
+
...monthTranslation.de,
|
|
3966
|
+
century: { one: "Jahrhundert", other: "Jahrhunderte" },
|
|
3967
|
+
decade: { one: "Jahrzehnt", other: "Jahrzehnte" },
|
|
3968
|
+
year: { one: "Jahr", other: "Jahre" },
|
|
3969
|
+
month: { one: "Monat", other: "Monate" },
|
|
3970
|
+
day: { one: "Tag", other: "Tage" },
|
|
3971
|
+
hour: { one: "Stunde", other: "Stunden" },
|
|
3972
|
+
minute: { one: "Minute", other: "Minuten" },
|
|
3973
|
+
second: { one: "Sekunde", other: "Sekunden" },
|
|
3974
|
+
millisecond: { one: "Millisekunde", other: "Millisekunden" },
|
|
3975
|
+
microsecond: { one: "Mikrosekunde", other: "Mikrosekunden" },
|
|
3976
|
+
nanosecond: { one: "Nanosekunde", other: "Nanosekunden" },
|
|
3977
|
+
yesterday: "Gestern",
|
|
3978
|
+
today: "Heute",
|
|
3979
|
+
tomorrow: "Morgen",
|
|
3980
|
+
in: "in",
|
|
3981
|
+
ago: "vor"
|
|
3850
3982
|
}
|
|
3851
3983
|
};
|
|
3984
|
+
|
|
3985
|
+
// src/components/date/DatePicker.tsx
|
|
3986
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3852
3987
|
var DatePicker = ({
|
|
3853
3988
|
overwriteTranslation,
|
|
3854
3989
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -3861,7 +3996,7 @@ var DatePicker = ({
|
|
|
3861
3996
|
className = ""
|
|
3862
3997
|
}) => {
|
|
3863
3998
|
const locale = useLocale();
|
|
3864
|
-
const translation = useTranslation(
|
|
3999
|
+
const translation = useTranslation([timeTranslation], overwriteTranslation);
|
|
3865
4000
|
const [displayedMonth, setDisplayedMonth] = useState6(value);
|
|
3866
4001
|
const [displayMode, setDisplayMode] = useState6(initialDisplay);
|
|
3867
4002
|
useEffect6(() => {
|
|
@@ -3944,7 +4079,7 @@ var DatePicker = ({
|
|
|
3944
4079
|
newDate.setHours(value.getHours(), value.getMinutes());
|
|
3945
4080
|
onChange(newDate);
|
|
3946
4081
|
},
|
|
3947
|
-
children: translation
|
|
4082
|
+
children: translation("today")
|
|
3948
4083
|
}
|
|
3949
4084
|
) })
|
|
3950
4085
|
] })
|
|
@@ -3974,42 +4109,14 @@ var DatePickerUncontrolled = ({
|
|
|
3974
4109
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
3975
4110
|
var defaultTimeDisplayTranslations = {
|
|
3976
4111
|
en: {
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
inDays: (days) => `in ${days} days`,
|
|
3981
|
-
agoDays: (days) => `${days} days ago`,
|
|
3982
|
-
january: "January",
|
|
3983
|
-
february: "February",
|
|
3984
|
-
march: "March",
|
|
3985
|
-
april: "April",
|
|
3986
|
-
may: "May",
|
|
3987
|
-
june: "June",
|
|
3988
|
-
july: "July",
|
|
3989
|
-
august: "August",
|
|
3990
|
-
september: "September",
|
|
3991
|
-
october: "October",
|
|
3992
|
-
november: "November",
|
|
3993
|
-
december: "December"
|
|
4112
|
+
...timeTranslation.en,
|
|
4113
|
+
inDays: `in {{days}} days`,
|
|
4114
|
+
agoDays: `{{days}} days ago`
|
|
3994
4115
|
},
|
|
3995
4116
|
de: {
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
inDays: (days) => `in ${days} Tagen`,
|
|
4000
|
-
agoDays: (days) => `vor ${days} Tagen`,
|
|
4001
|
-
january: "Januar",
|
|
4002
|
-
february: "Februar",
|
|
4003
|
-
march: "M\xE4rz",
|
|
4004
|
-
april: "April",
|
|
4005
|
-
may: "Mai",
|
|
4006
|
-
june: "Juni",
|
|
4007
|
-
july: "Juli",
|
|
4008
|
-
august: "August",
|
|
4009
|
-
september: "September",
|
|
4010
|
-
october: "October",
|
|
4011
|
-
november: "November",
|
|
4012
|
-
december: "December"
|
|
4117
|
+
...timeTranslation.de,
|
|
4118
|
+
inDays: `in {{days}} Tagen`,
|
|
4119
|
+
agoDays: `vor {{days}} Tagen`
|
|
4013
4120
|
}
|
|
4014
4121
|
};
|
|
4015
4122
|
var TimeDisplay = ({
|
|
@@ -4017,31 +4124,31 @@ var TimeDisplay = ({
|
|
|
4017
4124
|
date,
|
|
4018
4125
|
mode = "daysFromToday"
|
|
4019
4126
|
}) => {
|
|
4020
|
-
const translation = useTranslation(defaultTimeDisplayTranslations, overwriteTranslation);
|
|
4127
|
+
const translation = useTranslation([defaultTimeDisplayTranslations], overwriteTranslation);
|
|
4021
4128
|
const difference = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0).valueOf() - new Date(date).setHours(0, 0, 0, 0).valueOf();
|
|
4022
4129
|
const isBefore = difference > 0;
|
|
4023
4130
|
const differenceInDays = Math.floor(Math.abs(difference) / (1e3 * 3600 * 24));
|
|
4024
4131
|
let displayString;
|
|
4025
4132
|
if (differenceInDays === 0) {
|
|
4026
|
-
displayString = translation
|
|
4133
|
+
displayString = translation("today");
|
|
4027
4134
|
} else if (differenceInDays === 1) {
|
|
4028
|
-
displayString = isBefore ? translation
|
|
4135
|
+
displayString = isBefore ? translation("yesterday") : translation("tomorrow");
|
|
4029
4136
|
} else {
|
|
4030
|
-
displayString = isBefore ? translation.
|
|
4137
|
+
displayString = isBefore ? translation("agoDays", { replacements: { days: differenceInDays.toString() } }) : translation("inDays", { replacements: { days: differenceInDays.toString() } });
|
|
4031
4138
|
}
|
|
4032
4139
|
const monthToTranslation = {
|
|
4033
|
-
0: translation
|
|
4034
|
-
1: translation
|
|
4035
|
-
2: translation
|
|
4036
|
-
3: translation
|
|
4037
|
-
4: translation
|
|
4038
|
-
5: translation
|
|
4039
|
-
6: translation
|
|
4040
|
-
7: translation
|
|
4041
|
-
8: translation
|
|
4042
|
-
9: translation
|
|
4043
|
-
10: translation
|
|
4044
|
-
11: translation
|
|
4140
|
+
0: translation("january"),
|
|
4141
|
+
1: translation("february"),
|
|
4142
|
+
2: translation("march"),
|
|
4143
|
+
3: translation("april"),
|
|
4144
|
+
4: translation("may"),
|
|
4145
|
+
5: translation("june"),
|
|
4146
|
+
6: translation("july"),
|
|
4147
|
+
7: translation("august"),
|
|
4148
|
+
8: translation("september"),
|
|
4149
|
+
9: translation("october"),
|
|
4150
|
+
10: translation("november"),
|
|
4151
|
+
11: translation("december")
|
|
4045
4152
|
};
|
|
4046
4153
|
let fullString;
|
|
4047
4154
|
if (mode === "daysFromToday") {
|
|
@@ -4287,7 +4394,7 @@ var Tooltip = ({
|
|
|
4287
4394
|
{
|
|
4288
4395
|
className: clsx10(
|
|
4289
4396
|
`opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
4290
|
-
animate-tooltip-fade-in shadow-
|
|
4397
|
+
animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
|
|
4291
4398
|
positionClasses[position],
|
|
4292
4399
|
tooltipClassName
|
|
4293
4400
|
),
|
|
@@ -4298,7 +4405,7 @@ var Tooltip = ({
|
|
|
4298
4405
|
"div",
|
|
4299
4406
|
{
|
|
4300
4407
|
className: clsx10(`absolute w-0 h-0`, triangleClasses[position]),
|
|
4301
|
-
style: { ...triangleStyle[position], zIndex }
|
|
4408
|
+
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
4302
4409
|
}
|
|
4303
4410
|
)
|
|
4304
4411
|
]
|
|
@@ -4311,6 +4418,108 @@ var Tooltip = ({
|
|
|
4311
4418
|
|
|
4312
4419
|
// src/components/layout-and-navigation/Overlay.tsx
|
|
4313
4420
|
import { X } from "lucide-react";
|
|
4421
|
+
|
|
4422
|
+
// src/localization/defaults/form.ts
|
|
4423
|
+
var formTranslation = {
|
|
4424
|
+
en: {
|
|
4425
|
+
all: "All",
|
|
4426
|
+
back: "Back",
|
|
4427
|
+
cancel: "Cancel",
|
|
4428
|
+
change: "Change",
|
|
4429
|
+
clear: "Clear",
|
|
4430
|
+
close: "Close",
|
|
4431
|
+
confirm: "Confirm",
|
|
4432
|
+
decline: "Decline",
|
|
4433
|
+
delete: "Delete",
|
|
4434
|
+
discard: "Discard",
|
|
4435
|
+
discardChanges: "Discard Changes",
|
|
4436
|
+
done: "Done",
|
|
4437
|
+
edit: "Edit",
|
|
4438
|
+
enterText: "Enter text here",
|
|
4439
|
+
error: "Error",
|
|
4440
|
+
exit: "Exit",
|
|
4441
|
+
fieldRequiredError: "This field is required.",
|
|
4442
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
4443
|
+
less: "Less",
|
|
4444
|
+
loading: "Loading",
|
|
4445
|
+
maxLengthError: "Maximum length exceeded.",
|
|
4446
|
+
minLengthError: "Minimum length not met.",
|
|
4447
|
+
more: "More",
|
|
4448
|
+
next: "Next",
|
|
4449
|
+
no: "No",
|
|
4450
|
+
none: "None",
|
|
4451
|
+
of: "of",
|
|
4452
|
+
optional: "Optional",
|
|
4453
|
+
pleaseWait: "Please wait...",
|
|
4454
|
+
previous: "Previous",
|
|
4455
|
+
remove: "Remove",
|
|
4456
|
+
required: "Required",
|
|
4457
|
+
reset: "Reset",
|
|
4458
|
+
save: "Save",
|
|
4459
|
+
search: "Search",
|
|
4460
|
+
select: "Select",
|
|
4461
|
+
selectOption: "Select an option",
|
|
4462
|
+
show: "Show",
|
|
4463
|
+
showMore: "Show more",
|
|
4464
|
+
showLess: "Show less",
|
|
4465
|
+
submit: "Submit",
|
|
4466
|
+
success: "Success",
|
|
4467
|
+
update: "Update",
|
|
4468
|
+
unsavedChanges: "Unsaved Changes",
|
|
4469
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
4470
|
+
yes: "Yes"
|
|
4471
|
+
},
|
|
4472
|
+
de: {
|
|
4473
|
+
all: "Alle",
|
|
4474
|
+
back: "Zur\xFCck",
|
|
4475
|
+
cancel: "Abbrechen",
|
|
4476
|
+
change: "\xC4ndern",
|
|
4477
|
+
clear: "L\xF6schen",
|
|
4478
|
+
close: "Schlie\xDFen",
|
|
4479
|
+
confirm: "Best\xE4tigen",
|
|
4480
|
+
decline: "Ablehnen",
|
|
4481
|
+
delete: "L\xF6schen",
|
|
4482
|
+
discard: "Verwerfen",
|
|
4483
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
4484
|
+
done: "Fertig",
|
|
4485
|
+
edit: "Bearbeiten",
|
|
4486
|
+
enterText: "Text hier eingeben",
|
|
4487
|
+
error: "Fehler",
|
|
4488
|
+
exit: "Beenden",
|
|
4489
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
4490
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
4491
|
+
less: "Weniger",
|
|
4492
|
+
loading: "L\xE4dt",
|
|
4493
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
4494
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
4495
|
+
more: "Mehr",
|
|
4496
|
+
next: "Weiter",
|
|
4497
|
+
no: "Nein",
|
|
4498
|
+
none: "Nichts",
|
|
4499
|
+
of: "von",
|
|
4500
|
+
optional: "Optional",
|
|
4501
|
+
pleaseWait: "Bitte warten...",
|
|
4502
|
+
previous: "Vorherige",
|
|
4503
|
+
remove: "Entfernen",
|
|
4504
|
+
required: "Erforderlich",
|
|
4505
|
+
reset: "Zur\xFCcksetzen",
|
|
4506
|
+
save: "Speichern",
|
|
4507
|
+
search: "Suche",
|
|
4508
|
+
select: "Select",
|
|
4509
|
+
selectOption: "Option ausw\xE4hlen",
|
|
4510
|
+
show: "Anzeigen",
|
|
4511
|
+
showMore: "Mehr anzeigen",
|
|
4512
|
+
showLess: "Weniger anzeigen",
|
|
4513
|
+
submit: "Abschicken",
|
|
4514
|
+
success: "Erfolg",
|
|
4515
|
+
update: "Update",
|
|
4516
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
4517
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
4518
|
+
yes: "Ja"
|
|
4519
|
+
}
|
|
4520
|
+
};
|
|
4521
|
+
|
|
4522
|
+
// src/components/layout-and-navigation/Overlay.tsx
|
|
4314
4523
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4315
4524
|
var Overlay = ({
|
|
4316
4525
|
children,
|
|
@@ -4340,10 +4549,10 @@ var Overlay = ({
|
|
|
4340
4549
|
var overlayStack = [];
|
|
4341
4550
|
var defaultModalHeaderTranslation = {
|
|
4342
4551
|
en: {
|
|
4343
|
-
|
|
4552
|
+
...formTranslation.en
|
|
4344
4553
|
},
|
|
4345
4554
|
de: {
|
|
4346
|
-
|
|
4555
|
+
...formTranslation.de
|
|
4347
4556
|
}
|
|
4348
4557
|
};
|
|
4349
4558
|
var OverlayHeader = ({
|
|
@@ -4354,7 +4563,7 @@ var OverlayHeader = ({
|
|
|
4354
4563
|
description,
|
|
4355
4564
|
descriptionText = ""
|
|
4356
4565
|
}) => {
|
|
4357
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
4566
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
4358
4567
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
4359
4568
|
const titleRow = /* @__PURE__ */ jsxs9("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
4360
4569
|
title ?? /* @__PURE__ */ jsx13(
|
|
@@ -4366,7 +4575,7 @@ var OverlayHeader = ({
|
|
|
4366
4575
|
children: titleText
|
|
4367
4576
|
}
|
|
4368
4577
|
),
|
|
4369
|
-
!!onClose && /* @__PURE__ */ jsx13(Tooltip, { tooltip: translation
|
|
4578
|
+
!!onClose && /* @__PURE__ */ jsx13(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ jsx13(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ jsx13(X, { className: "w-full h-full" }) }) })
|
|
4370
4579
|
] });
|
|
4371
4580
|
return /* @__PURE__ */ jsxs9("div", { className: "col", children: [
|
|
4372
4581
|
hasTitleRow && titleRow,
|
|
@@ -4517,16 +4726,6 @@ var Dialog = ({
|
|
|
4517
4726
|
|
|
4518
4727
|
// src/components/dialogs/ConfirmDialog.tsx
|
|
4519
4728
|
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4520
|
-
var defaultConfirmDialogTranslation = {
|
|
4521
|
-
en: {
|
|
4522
|
-
confirm: "Confirm",
|
|
4523
|
-
decline: "Decline"
|
|
4524
|
-
},
|
|
4525
|
-
de: {
|
|
4526
|
-
confirm: "Best\xE4tigen",
|
|
4527
|
-
decline: "Ablehnen"
|
|
4528
|
-
}
|
|
4529
|
-
};
|
|
4530
4729
|
var ConfirmDialog = ({
|
|
4531
4730
|
overwriteTranslation,
|
|
4532
4731
|
children,
|
|
@@ -4537,7 +4736,7 @@ var ConfirmDialog = ({
|
|
|
4537
4736
|
className,
|
|
4538
4737
|
...restProps
|
|
4539
4738
|
}) => {
|
|
4540
|
-
const translation = useTranslation(
|
|
4739
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
4541
4740
|
const mapping = {
|
|
4542
4741
|
neutral: "primary",
|
|
4543
4742
|
negative: "negative",
|
|
@@ -4553,7 +4752,7 @@ var ConfirmDialog = ({
|
|
|
4553
4752
|
color: buttonOverwrites?.[0].color ?? "negative",
|
|
4554
4753
|
onClick: onDecline,
|
|
4555
4754
|
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
4556
|
-
children: buttonOverwrites?.[0].text ?? translation
|
|
4755
|
+
children: buttonOverwrites?.[0].text ?? translation("decline")
|
|
4557
4756
|
}
|
|
4558
4757
|
),
|
|
4559
4758
|
/* @__PURE__ */ jsx14(
|
|
@@ -4563,7 +4762,7 @@ var ConfirmDialog = ({
|
|
|
4563
4762
|
color: buttonOverwrites?.[1].color ?? mapping[confirmType],
|
|
4564
4763
|
onClick: onConfirm,
|
|
4565
4764
|
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
4566
|
-
children: buttonOverwrites?.[1].text ?? translation
|
|
4765
|
+
children: buttonOverwrites?.[1].text ?? translation("confirm")
|
|
4567
4766
|
}
|
|
4568
4767
|
)
|
|
4569
4768
|
] })
|
|
@@ -4598,10 +4797,10 @@ var Avatar = ({ avatarUrl, alt, size = "medium", className = "" }) => {
|
|
|
4598
4797
|
};
|
|
4599
4798
|
return (
|
|
4600
4799
|
// TODO transparent or white background later
|
|
4601
|
-
/* @__PURE__ */ jsx15("div", { className: clsx13(`rounded-full bg-primary`, className), style, children: /* @__PURE__ */ jsx15(
|
|
4800
|
+
/* @__PURE__ */ jsx15("div", { className: clsx13(`rounded-full bg-primary shadow`, className), style, children: /* @__PURE__ */ jsx15(
|
|
4602
4801
|
"img",
|
|
4603
4802
|
{
|
|
4604
|
-
className: "rounded-full
|
|
4803
|
+
className: "rounded-full",
|
|
4605
4804
|
style,
|
|
4606
4805
|
src: avatarUrl,
|
|
4607
4806
|
alt,
|
|
@@ -5091,7 +5290,7 @@ var Carousel = ({
|
|
|
5091
5290
|
arrows = false,
|
|
5092
5291
|
dots = true,
|
|
5093
5292
|
overScrollThreshold = 0.1,
|
|
5094
|
-
blurColor = "from-
|
|
5293
|
+
blurColor = "from-background",
|
|
5095
5294
|
className = "",
|
|
5096
5295
|
heightClassName = "h-[24rem]",
|
|
5097
5296
|
widthClassName = "w-[70%] desktop:w-1/2"
|
|
@@ -5323,19 +5522,23 @@ var Carousel = ({
|
|
|
5323
5522
|
/* @__PURE__ */ jsxs14("div", { className: clsx17(`relative w-full overflow-hidden`, heightClassName, className), children: [
|
|
5324
5523
|
arrows && /* @__PURE__ */ jsxs14(Fragment, { children: [
|
|
5325
5524
|
/* @__PURE__ */ jsx20(
|
|
5326
|
-
|
|
5525
|
+
IconButton,
|
|
5327
5526
|
{
|
|
5328
|
-
|
|
5527
|
+
color: "neutral",
|
|
5528
|
+
className: clsx17("absolute z-10 left-0 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
|
|
5529
|
+
disabled: !canGoLeft(),
|
|
5329
5530
|
onClick: () => left(),
|
|
5330
|
-
children: /* @__PURE__ */ jsx20(ChevronLeft, { size:
|
|
5531
|
+
children: /* @__PURE__ */ jsx20(ChevronLeft, { size: 24 })
|
|
5331
5532
|
}
|
|
5332
5533
|
),
|
|
5333
5534
|
/* @__PURE__ */ jsx20(
|
|
5334
|
-
|
|
5535
|
+
IconButton,
|
|
5335
5536
|
{
|
|
5336
|
-
|
|
5537
|
+
color: "neutral",
|
|
5538
|
+
className: clsx17("absolute z-10 right-0 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
|
|
5539
|
+
disabled: !canGoRight(),
|
|
5337
5540
|
onClick: () => right(),
|
|
5338
|
-
children: /* @__PURE__ */ jsx20(ChevronRight, { size:
|
|
5541
|
+
children: /* @__PURE__ */ jsx20(ChevronRight, { size: 24 })
|
|
5339
5542
|
}
|
|
5340
5543
|
)
|
|
5341
5544
|
] }),
|
|
@@ -5375,9 +5578,9 @@ var Carousel = ({
|
|
|
5375
5578
|
children: range(0, length - 1).map((index) => /* @__PURE__ */ jsx20(
|
|
5376
5579
|
"button",
|
|
5377
5580
|
{
|
|
5378
|
-
className: clsx17("w-[2rem] min-w-[2rem] h-[0.75rem] min-h-[0.75rem]
|
|
5379
|
-
"bg-
|
|
5380
|
-
"bg-
|
|
5581
|
+
className: clsx17("w-[2rem] min-w-[2rem] h-[0.75rem] min-h-[0.75rem] first:rounded-l-md last:rounded-r-md", {
|
|
5582
|
+
"bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
|
|
5583
|
+
"bg-carousel-dot-active hover:brightness-90": currentIndex === index
|
|
5381
5584
|
}),
|
|
5382
5585
|
onClick: () => startAnimation(index)
|
|
5383
5586
|
},
|
|
@@ -5575,7 +5778,7 @@ var inserterIdentifierMapping = [
|
|
|
5575
5778
|
{ id: "helpwave", name: "helpwave" },
|
|
5576
5779
|
{ id: "newline", name: "newline" }
|
|
5577
5780
|
];
|
|
5578
|
-
var parseMarkdown = (text, commandStart = "\\",
|
|
5781
|
+
var parseMarkdown = (text, commandStart = "\\", open2 = "{", close = "}") => {
|
|
5579
5782
|
let start = text.indexOf(commandStart);
|
|
5580
5783
|
const children = [];
|
|
5581
5784
|
while (text !== "") {
|
|
@@ -5596,7 +5799,7 @@ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
|
|
|
5596
5799
|
text = "";
|
|
5597
5800
|
continue;
|
|
5598
5801
|
}
|
|
5599
|
-
const simpleReplace = [commandStart,
|
|
5802
|
+
const simpleReplace = [commandStart, open2, close];
|
|
5600
5803
|
if (simpleReplace.some((value) => text[1] === value)) {
|
|
5601
5804
|
children.push({
|
|
5602
5805
|
type: "text",
|
|
@@ -5617,7 +5820,7 @@ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
|
|
|
5617
5820
|
}
|
|
5618
5821
|
const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
|
|
5619
5822
|
if (modifier) {
|
|
5620
|
-
if (text[modifier.id.length + 1] !==
|
|
5823
|
+
if (text[modifier.id.length + 1] !== open2) {
|
|
5621
5824
|
children.push({
|
|
5622
5825
|
type: "text",
|
|
5623
5826
|
text: text.substring(0, modifier.id.length + 1)
|
|
@@ -5631,7 +5834,7 @@ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
|
|
|
5631
5834
|
let counter = 1;
|
|
5632
5835
|
let escaping = false;
|
|
5633
5836
|
while (index < text.length) {
|
|
5634
|
-
if (text[index] ===
|
|
5837
|
+
if (text[index] === open2 && !escaping) {
|
|
5635
5838
|
counter++;
|
|
5636
5839
|
}
|
|
5637
5840
|
if (text[index] === close && !escaping) {
|
|
@@ -5735,21 +5938,13 @@ var FAQSection = ({
|
|
|
5735
5938
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
5736
5939
|
import clsx21 from "clsx";
|
|
5737
5940
|
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5738
|
-
var defaultPaginationTranslations = {
|
|
5739
|
-
en: {
|
|
5740
|
-
of: "of"
|
|
5741
|
-
},
|
|
5742
|
-
de: {
|
|
5743
|
-
of: "von"
|
|
5744
|
-
}
|
|
5745
|
-
};
|
|
5746
5941
|
var Pagination = ({
|
|
5747
5942
|
overwriteTranslation,
|
|
5748
5943
|
page,
|
|
5749
5944
|
numberOfPages,
|
|
5750
5945
|
onPageChanged
|
|
5751
5946
|
}) => {
|
|
5752
|
-
const translation = useTranslation(
|
|
5947
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
5753
5948
|
const changePage = (page2) => {
|
|
5754
5949
|
onPageChanged(page2);
|
|
5755
5950
|
};
|
|
@@ -5761,7 +5956,7 @@ var Pagination = ({
|
|
|
5761
5956
|
/* @__PURE__ */ jsx25("button", { onClick: () => changePage(page - 1), disabled: onFirstPage, children: /* @__PURE__ */ jsx25(ChevronLeft2, { className: clsx21({ "opacity-30": onFirstPage }) }) }),
|
|
5762
5957
|
/* @__PURE__ */ jsxs16("div", { className: "min-w-[80px] justify-center mx-2", children: [
|
|
5763
5958
|
/* @__PURE__ */ jsx25("span", { className: "select-none text-right flex-1", children: noPages ? 0 : page + 1 }),
|
|
5764
|
-
/* @__PURE__ */ jsx25("span", { className: "select-none mx-2", children: translation
|
|
5959
|
+
/* @__PURE__ */ jsx25("span", { className: "select-none mx-2", children: translation("of") }),
|
|
5765
5960
|
/* @__PURE__ */ jsx25("span", { className: "select-none text-left flex-1", children: numberOfPages })
|
|
5766
5961
|
] }),
|
|
5767
5962
|
/* @__PURE__ */ jsx25("button", { onClick: () => changePage(page + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx25(ChevronRight2, { className: clsx21({ "opacity-30": onLastPage }) }) }),
|
|
@@ -5770,30 +5965,9 @@ var Pagination = ({
|
|
|
5770
5965
|
};
|
|
5771
5966
|
|
|
5772
5967
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
5773
|
-
import { useEffect as useEffect14, useMemo as useMemo2, useState as useState14 } from "react";
|
|
5774
5968
|
import { Search } from "lucide-react";
|
|
5775
5969
|
import clsx24 from "clsx";
|
|
5776
5970
|
|
|
5777
|
-
// src/util/simpleSearch.ts
|
|
5778
|
-
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
5779
|
-
return objects.filter((object) => {
|
|
5780
|
-
const mappedSearchKeywords = mapping(object).map((value) => value ? value.toLowerCase().trim() : void 0);
|
|
5781
|
-
return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
|
|
5782
|
-
});
|
|
5783
|
-
};
|
|
5784
|
-
var MultiSearchWithMapping = (search, objects, mapping) => {
|
|
5785
|
-
return objects.filter((object) => {
|
|
5786
|
-
const mappedSearchKeywords = mapping(object).map((value) => value.toLowerCase().trim());
|
|
5787
|
-
return !!mappedSearchKeywords.find((value) => value.includes(search.toLowerCase().trim()));
|
|
5788
|
-
});
|
|
5789
|
-
};
|
|
5790
|
-
var SimpleSearchWithMapping = (search, objects, mapping) => {
|
|
5791
|
-
return MultiSearchWithMapping(search, objects, (value) => [mapping(value)]);
|
|
5792
|
-
};
|
|
5793
|
-
var SimpleSearch = (search, objects) => {
|
|
5794
|
-
return SimpleSearchWithMapping(search, objects, (value) => value);
|
|
5795
|
-
};
|
|
5796
|
-
|
|
5797
5971
|
// src/components/user-action/Input.tsx
|
|
5798
5972
|
import { forwardRef as forwardRef2, useEffect as useEffect13, useRef as useRef5, useState as useState13 } from "react";
|
|
5799
5973
|
import clsx23 from "clsx";
|
|
@@ -5972,15 +6146,64 @@ var FormInput = forwardRef2(function FormInput2({
|
|
|
5972
6146
|
] });
|
|
5973
6147
|
});
|
|
5974
6148
|
|
|
6149
|
+
// src/hooks/useSearch.ts
|
|
6150
|
+
import { useEffect as useEffect14, useMemo as useMemo2, useState as useState14 } from "react";
|
|
6151
|
+
|
|
6152
|
+
// src/util/simpleSearch.ts
|
|
6153
|
+
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
6154
|
+
return objects.filter((object) => {
|
|
6155
|
+
const mappedSearchKeywords = mapping(object).map((value) => value ? value.toLowerCase().trim() : void 0);
|
|
6156
|
+
return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
|
|
6157
|
+
});
|
|
6158
|
+
};
|
|
6159
|
+
var MultiSearchWithMapping = (search, objects, mapping) => {
|
|
6160
|
+
return objects.filter((object) => {
|
|
6161
|
+
const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
|
|
6162
|
+
if (!mappedSearchKeywords) {
|
|
6163
|
+
return true;
|
|
6164
|
+
}
|
|
6165
|
+
return !!mappedSearchKeywords.find((value) => value.includes(search.toLowerCase().trim()));
|
|
6166
|
+
});
|
|
6167
|
+
};
|
|
6168
|
+
var SimpleSearchWithMapping = (search, objects, mapping) => {
|
|
6169
|
+
return MultiSearchWithMapping(search, objects, (value) => [mapping(value)]);
|
|
6170
|
+
};
|
|
6171
|
+
var SimpleSearch = (search, objects) => {
|
|
6172
|
+
return SimpleSearchWithMapping(search, objects, (value) => value);
|
|
6173
|
+
};
|
|
6174
|
+
|
|
6175
|
+
// src/hooks/useSearch.ts
|
|
6176
|
+
var useSearch = ({
|
|
6177
|
+
list,
|
|
6178
|
+
initialSearch,
|
|
6179
|
+
searchMapping
|
|
6180
|
+
}) => {
|
|
6181
|
+
const [items, setItems] = useState14(list);
|
|
6182
|
+
const [search, setSearch] = useState14(initialSearch);
|
|
6183
|
+
useEffect14(() => {
|
|
6184
|
+
setItems(list);
|
|
6185
|
+
}, [list]);
|
|
6186
|
+
const result = useMemo2(
|
|
6187
|
+
() => MultiSearchWithMapping(search, items, searchMapping),
|
|
6188
|
+
[search, items, searchMapping]
|
|
6189
|
+
);
|
|
6190
|
+
return {
|
|
6191
|
+
result,
|
|
6192
|
+
hasResult: result.length > 0,
|
|
6193
|
+
allItems: items,
|
|
6194
|
+
setItems,
|
|
6195
|
+
search,
|
|
6196
|
+
setSearch
|
|
6197
|
+
};
|
|
6198
|
+
};
|
|
6199
|
+
|
|
5975
6200
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
5976
6201
|
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5977
6202
|
var defaultSearchableListTranslation = {
|
|
5978
6203
|
en: {
|
|
5979
|
-
search: "Search",
|
|
5980
6204
|
nothingFound: "Nothing found"
|
|
5981
6205
|
},
|
|
5982
6206
|
de: {
|
|
5983
|
-
search: "Suche",
|
|
5984
6207
|
nothingFound: "Nichts gefunden"
|
|
5985
6208
|
}
|
|
5986
6209
|
};
|
|
@@ -5989,40 +6212,37 @@ var SearchableList = ({
|
|
|
5989
6212
|
list,
|
|
5990
6213
|
initialSearch = "",
|
|
5991
6214
|
searchMapping,
|
|
6215
|
+
autoFocus,
|
|
6216
|
+
minimumItemsForSearch = 6,
|
|
5992
6217
|
itemMapper,
|
|
5993
|
-
className
|
|
6218
|
+
className,
|
|
6219
|
+
resultListClassName
|
|
5994
6220
|
}) => {
|
|
5995
|
-
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
5996
|
-
const
|
|
5997
|
-
useEffect14(() => setSearch(initialSearch), [initialSearch]);
|
|
5998
|
-
const filteredEntries = useMemo2(() => MultiSearchWithMapping(search, list, searchMapping), [search, list, searchMapping]);
|
|
6221
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
6222
|
+
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
5999
6223
|
return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
|
|
6000
|
-
/* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-
|
|
6001
|
-
/* @__PURE__ */ jsx28(
|
|
6002
|
-
|
|
6224
|
+
list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
6225
|
+
/* @__PURE__ */ jsx28(
|
|
6226
|
+
Input,
|
|
6227
|
+
{
|
|
6228
|
+
value: search,
|
|
6229
|
+
onChangeText: setSearch,
|
|
6230
|
+
placeholder: translation("search"),
|
|
6231
|
+
autoFocus,
|
|
6232
|
+
className: "w-full"
|
|
6233
|
+
}
|
|
6234
|
+
),
|
|
6235
|
+
/* @__PURE__ */ jsx28(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx28(Search, { className: "w-full h-full" }) })
|
|
6003
6236
|
] }),
|
|
6004
|
-
|
|
6005
|
-
!filteredEntries.length && /* @__PURE__ */ jsx28("div", { className: "row justify-center", children: translation.nothingFound })
|
|
6237
|
+
hasResult ? /* @__PURE__ */ jsx28("div", { className: clsx24("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ jsx28("div", { className: "row text-description py-2 px-2", children: translation("nothingFound") })
|
|
6006
6238
|
] });
|
|
6007
6239
|
};
|
|
6008
6240
|
|
|
6009
6241
|
// src/components/layout-and-navigation/StepperBar.tsx
|
|
6010
|
-
import { Check, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
6242
|
+
import { Check as Check2, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
6011
6243
|
import clsx25 from "clsx";
|
|
6012
6244
|
import { useEffect as useEffect15, useState as useState15 } from "react";
|
|
6013
6245
|
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6014
|
-
var defaultStepperBarTranslation = {
|
|
6015
|
-
en: {
|
|
6016
|
-
back: "Back",
|
|
6017
|
-
next: "Next Step",
|
|
6018
|
-
confirm: "Create"
|
|
6019
|
-
},
|
|
6020
|
-
de: {
|
|
6021
|
-
back: "Zur\xFCck",
|
|
6022
|
-
next: "N\xE4chster Schritt",
|
|
6023
|
-
confirm: "Erstellen"
|
|
6024
|
-
}
|
|
6025
|
-
};
|
|
6026
6246
|
var defaultState = {
|
|
6027
6247
|
currentStep: 0,
|
|
6028
6248
|
seenSteps: /* @__PURE__ */ new Set([0])
|
|
@@ -6038,7 +6258,7 @@ var StepperBar = ({
|
|
|
6038
6258
|
showDots = true,
|
|
6039
6259
|
className = ""
|
|
6040
6260
|
}) => {
|
|
6041
|
-
const translation = useTranslation(
|
|
6261
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6042
6262
|
const dots = range(0, numberOfSteps);
|
|
6043
6263
|
const { currentStep, seenSteps } = state ?? defaultState;
|
|
6044
6264
|
const update = (newStep) => {
|
|
@@ -6060,7 +6280,7 @@ var StepperBar = ({
|
|
|
6060
6280
|
className: "row gap-x-1 items-center justify-center",
|
|
6061
6281
|
children: [
|
|
6062
6282
|
/* @__PURE__ */ jsx29(ChevronLeft3, { size: 14 }),
|
|
6063
|
-
translation
|
|
6283
|
+
translation("back")
|
|
6064
6284
|
]
|
|
6065
6285
|
}
|
|
6066
6286
|
) }),
|
|
@@ -6073,9 +6293,9 @@ var StepperBar = ({
|
|
|
6073
6293
|
className: clsx25(
|
|
6074
6294
|
"rounded-full w-4 h-4",
|
|
6075
6295
|
{
|
|
6076
|
-
"bg-
|
|
6077
|
-
"bg-
|
|
6078
|
-
"bg-
|
|
6296
|
+
"bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
|
|
6297
|
+
"bg-stepperbar-dot-normal hover:bg-stepperbar-dot-active": index !== currentStep && seen && !disabledSteps.has(currentStep),
|
|
6298
|
+
"bg-stepperbar-dot-disabled": !seen || disabledSteps.has(currentStep)
|
|
6079
6299
|
},
|
|
6080
6300
|
{
|
|
6081
6301
|
"cursor-pointer": seen,
|
|
@@ -6093,7 +6313,7 @@ var StepperBar = ({
|
|
|
6093
6313
|
className: "row gap-x-1 items-center justify-center",
|
|
6094
6314
|
disabled: disabledSteps.has(currentStep),
|
|
6095
6315
|
children: [
|
|
6096
|
-
translation
|
|
6316
|
+
translation("next"),
|
|
6097
6317
|
/* @__PURE__ */ jsx29(ChevronRight3, { size: 14 })
|
|
6098
6318
|
]
|
|
6099
6319
|
}
|
|
@@ -6105,8 +6325,8 @@ var StepperBar = ({
|
|
|
6105
6325
|
onClick: onFinish,
|
|
6106
6326
|
className: "row gap-x-1 items-center justify-center",
|
|
6107
6327
|
children: [
|
|
6108
|
-
/* @__PURE__ */ jsx29(
|
|
6109
|
-
finishText ?? translation
|
|
6328
|
+
/* @__PURE__ */ jsx29(Check2, { size: 14 }),
|
|
6329
|
+
finishText ?? translation("confirm")
|
|
6110
6330
|
]
|
|
6111
6331
|
}
|
|
6112
6332
|
) })
|
|
@@ -6139,7 +6359,7 @@ import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
|
|
|
6139
6359
|
// src/components/user-action/Checkbox.tsx
|
|
6140
6360
|
import { useState as useState16 } from "react";
|
|
6141
6361
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
6142
|
-
import { Check as
|
|
6362
|
+
import { Check as Check3, Minus } from "lucide-react";
|
|
6143
6363
|
import clsx26 from "clsx";
|
|
6144
6364
|
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6145
6365
|
var checkboxSizeMapping = {
|
|
@@ -6192,7 +6412,7 @@ var Checkbox = ({
|
|
|
6192
6412
|
"hover:border-primary focus:hover:border-primary": !checked
|
|
6193
6413
|
}, className),
|
|
6194
6414
|
children: /* @__PURE__ */ jsxs20(CheckboxPrimitive.Indicator, { children: [
|
|
6195
|
-
checked === true && /* @__PURE__ */ jsx30(
|
|
6415
|
+
checked === true && /* @__PURE__ */ jsx30(Check3, { className: innerIconSize }),
|
|
6196
6416
|
checked === "indeterminate" && /* @__PURE__ */ jsx30(Minus, { className: innerIconSize })
|
|
6197
6417
|
] })
|
|
6198
6418
|
}
|
|
@@ -6385,7 +6605,7 @@ var Table = ({
|
|
|
6385
6605
|
} else {
|
|
6386
6606
|
currentPage = 0;
|
|
6387
6607
|
}
|
|
6388
|
-
const headerRow = "border-b-2
|
|
6608
|
+
const headerRow = "border-b-2";
|
|
6389
6609
|
const headerPaddingHead = "pb-2";
|
|
6390
6610
|
const headerPaddingBody = "pt-2";
|
|
6391
6611
|
const cellPadding = "py-1 px-2";
|
|
@@ -6470,14 +6690,6 @@ var SortButton = ({
|
|
|
6470
6690
|
// src/components/layout-and-navigation/TextImage.tsx
|
|
6471
6691
|
import clsx28 from "clsx";
|
|
6472
6692
|
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6473
|
-
var defaultTextImageTranslation = {
|
|
6474
|
-
de: {
|
|
6475
|
-
showMore: "Mehr anzeigen"
|
|
6476
|
-
},
|
|
6477
|
-
en: {
|
|
6478
|
-
showMore: "Show more"
|
|
6479
|
-
}
|
|
6480
|
-
};
|
|
6481
6693
|
var TextImage = ({
|
|
6482
6694
|
overwriteTranslation,
|
|
6483
6695
|
title,
|
|
@@ -6489,11 +6701,11 @@ var TextImage = ({
|
|
|
6489
6701
|
contentClassName = "",
|
|
6490
6702
|
className = ""
|
|
6491
6703
|
}) => {
|
|
6492
|
-
const translation = useTranslation(
|
|
6704
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6493
6705
|
const chipColorMapping = {
|
|
6494
|
-
primary: "text-text-image-primary-background bg-text-
|
|
6495
|
-
secondary: "text-text-image-secondary-background bg-text-
|
|
6496
|
-
dark: "text-text-image-dark-background bg-text-
|
|
6706
|
+
primary: "text-text-image-primary-background bg-text-image-primary-text",
|
|
6707
|
+
secondary: "text-text-image-secondary-background bg-text-image-secondary-text",
|
|
6708
|
+
dark: "text-text-image-dark-background bg-text-image-dark-text"
|
|
6497
6709
|
};
|
|
6498
6710
|
const colorMapping = {
|
|
6499
6711
|
primary: "text-text-image-primary-text bg-linear-to-r from-30% from-text-image-primary-background to-text-image-primary-background/55",
|
|
@@ -6513,12 +6725,12 @@ var TextImage = ({
|
|
|
6513
6725
|
{
|
|
6514
6726
|
className: clsx28(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
|
|
6515
6727
|
children: [
|
|
6516
|
-
badge && /* @__PURE__ */ jsx32("div", { className: clsx28(`chip-full
|
|
6517
|
-
/* @__PURE__ */ jsxs22("div", { className: "col gap-y-1
|
|
6728
|
+
badge && /* @__PURE__ */ jsx32("div", { className: clsx28(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ jsx32("span", { className: "text-lg font-bold", children: badge }) }),
|
|
6729
|
+
/* @__PURE__ */ jsxs22("div", { className: "col gap-y-1 overflow-hidden", children: [
|
|
6518
6730
|
/* @__PURE__ */ jsx32("span", { className: "textstyle-title-xl", children: title }),
|
|
6519
6731
|
/* @__PURE__ */ jsx32("span", { className: "text-ellipsis overflow-hidden", children: description })
|
|
6520
6732
|
] }),
|
|
6521
|
-
onShowMoreClicked && /* @__PURE__ */ jsx32("div", { className: "row mt-2
|
|
6733
|
+
onShowMoreClicked && /* @__PURE__ */ jsx32("div", { className: "row mt-2 underline", children: /* @__PURE__ */ jsx32("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
|
|
6522
6734
|
]
|
|
6523
6735
|
}
|
|
6524
6736
|
)
|
|
@@ -6596,10 +6808,10 @@ var ErrorComponent = ({
|
|
|
6596
6808
|
errorText,
|
|
6597
6809
|
classname
|
|
6598
6810
|
}) => {
|
|
6599
|
-
const translation = useTranslation(defaultErrorComponentTranslation, overwriteTranslation);
|
|
6811
|
+
const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
|
|
6600
6812
|
return /* @__PURE__ */ jsxs24("div", { className: clsx29("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
|
|
6601
6813
|
/* @__PURE__ */ jsx34(AlertOctagon, { size: 64, className: "text-warning" }),
|
|
6602
|
-
errorText ?? `${translation
|
|
6814
|
+
errorText ?? `${translation("errorOccurred")} :(`
|
|
6603
6815
|
] });
|
|
6604
6816
|
};
|
|
6605
6817
|
|
|
@@ -6609,23 +6821,15 @@ import { useState as useState18 } from "react";
|
|
|
6609
6821
|
// src/components/loading-states/LoadingAnimation.tsx
|
|
6610
6822
|
import clsx30 from "clsx";
|
|
6611
6823
|
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6612
|
-
var defaultLoadingAnimationTranslation = {
|
|
6613
|
-
en: {
|
|
6614
|
-
loading: "Loading data"
|
|
6615
|
-
},
|
|
6616
|
-
de: {
|
|
6617
|
-
loading: "Lade Daten"
|
|
6618
|
-
}
|
|
6619
|
-
};
|
|
6620
6824
|
var LoadingAnimation = ({
|
|
6621
6825
|
overwriteTranslation,
|
|
6622
6826
|
loadingText,
|
|
6623
6827
|
classname
|
|
6624
6828
|
}) => {
|
|
6625
|
-
const translation = useTranslation(
|
|
6829
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6626
6830
|
return /* @__PURE__ */ jsxs25("div", { className: clsx30("col items-center justify-center w-full h-24", classname), children: [
|
|
6627
6831
|
/* @__PURE__ */ jsx35(Helpwave, { animate: "loading" }),
|
|
6628
|
-
loadingText ?? `${translation
|
|
6832
|
+
loadingText ?? `${translation("loading")}...`
|
|
6629
6833
|
] });
|
|
6630
6834
|
};
|
|
6631
6835
|
|
|
@@ -6703,7 +6907,7 @@ var ProgressIndicator = ({
|
|
|
6703
6907
|
r: radius,
|
|
6704
6908
|
fill: "transparent",
|
|
6705
6909
|
strokeWidth,
|
|
6706
|
-
className: "stroke-
|
|
6910
|
+
className: "stroke-progress-indicator-fill"
|
|
6707
6911
|
}
|
|
6708
6912
|
),
|
|
6709
6913
|
/* @__PURE__ */ jsx38(
|
|
@@ -6716,7 +6920,7 @@ var ProgressIndicator = ({
|
|
|
6716
6920
|
strokeWidth,
|
|
6717
6921
|
strokeDasharray: arcLength,
|
|
6718
6922
|
strokeDashoffset: arcOffset,
|
|
6719
|
-
className: "stroke-
|
|
6923
|
+
className: "stroke-progress-indicator-background"
|
|
6720
6924
|
}
|
|
6721
6925
|
)
|
|
6722
6926
|
]
|
|
@@ -6727,18 +6931,6 @@ var ProgressIndicator = ({
|
|
|
6727
6931
|
// src/components/modals/ConfirmModal.tsx
|
|
6728
6932
|
import clsx32 from "clsx";
|
|
6729
6933
|
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6730
|
-
var defaultConfirmDialogTranslation2 = {
|
|
6731
|
-
en: {
|
|
6732
|
-
confirm: "Confirm",
|
|
6733
|
-
cancel: "Cancel",
|
|
6734
|
-
decline: "Decline"
|
|
6735
|
-
},
|
|
6736
|
-
de: {
|
|
6737
|
-
confirm: "Best\xE4tigen",
|
|
6738
|
-
cancel: "Abbrechen",
|
|
6739
|
-
decline: "Ablehnen"
|
|
6740
|
-
}
|
|
6741
|
-
};
|
|
6742
6934
|
var ConfirmModal = ({
|
|
6743
6935
|
overwriteTranslation,
|
|
6744
6936
|
children,
|
|
@@ -6750,7 +6942,7 @@ var ConfirmModal = ({
|
|
|
6750
6942
|
className,
|
|
6751
6943
|
...restProps
|
|
6752
6944
|
}) => {
|
|
6753
|
-
const translation = useTranslation(
|
|
6945
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6754
6946
|
const mapping = {
|
|
6755
6947
|
neutral: "neutral",
|
|
6756
6948
|
negative: "negative",
|
|
@@ -6766,7 +6958,7 @@ var ConfirmModal = ({
|
|
|
6766
6958
|
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
6767
6959
|
onClick: onCancel,
|
|
6768
6960
|
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
6769
|
-
children: buttonOverwrites?.[0].text ?? translation
|
|
6961
|
+
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
6770
6962
|
}
|
|
6771
6963
|
),
|
|
6772
6964
|
onDecline && /* @__PURE__ */ jsx39(
|
|
@@ -6775,7 +6967,7 @@ var ConfirmModal = ({
|
|
|
6775
6967
|
color: buttonOverwrites?.[1].color ?? "negative",
|
|
6776
6968
|
onClick: onDecline,
|
|
6777
6969
|
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
6778
|
-
children: buttonOverwrites?.[1].text ?? translation
|
|
6970
|
+
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
6779
6971
|
}
|
|
6780
6972
|
),
|
|
6781
6973
|
/* @__PURE__ */ jsx39(
|
|
@@ -6785,7 +6977,7 @@ var ConfirmModal = ({
|
|
|
6785
6977
|
color: buttonOverwrites?.[2].color ?? mapping[confirmType],
|
|
6786
6978
|
onClick: onConfirm,
|
|
6787
6979
|
disabled: buttonOverwrites?.[2].disabled ?? false,
|
|
6788
|
-
children: buttonOverwrites?.[2].text ?? translation
|
|
6980
|
+
children: buttonOverwrites?.[2].text ?? translation("confirm")
|
|
6789
6981
|
}
|
|
6790
6982
|
)
|
|
6791
6983
|
] })
|
|
@@ -6794,22 +6986,6 @@ var ConfirmModal = ({
|
|
|
6794
6986
|
|
|
6795
6987
|
// src/components/modals/DiscardChangesModal.tsx
|
|
6796
6988
|
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
6797
|
-
var defaultDiscardChangesModalTranslation = {
|
|
6798
|
-
en: {
|
|
6799
|
-
save: "Save",
|
|
6800
|
-
cancel: "Cancel",
|
|
6801
|
-
dontSave: "Don't save",
|
|
6802
|
-
title: "Unsaved Changes",
|
|
6803
|
-
description: "Do you want to save your changes?"
|
|
6804
|
-
},
|
|
6805
|
-
de: {
|
|
6806
|
-
save: "Speichern",
|
|
6807
|
-
cancel: "Abbrechen",
|
|
6808
|
-
dontSave: "Nicht Speichern",
|
|
6809
|
-
title: "Ungespeicherte \xC4nderungen",
|
|
6810
|
-
description: "M\xF6chtest du die \xC4nderungen speichern?"
|
|
6811
|
-
}
|
|
6812
|
-
};
|
|
6813
6989
|
var DiscardChangesModal = ({
|
|
6814
6990
|
overwriteTranslation,
|
|
6815
6991
|
children,
|
|
@@ -6819,19 +6995,19 @@ var DiscardChangesModal = ({
|
|
|
6819
6995
|
headerProps,
|
|
6820
6996
|
...modalProps
|
|
6821
6997
|
}) => {
|
|
6822
|
-
const translation = useTranslation(
|
|
6998
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6823
6999
|
return /* @__PURE__ */ jsx40(
|
|
6824
7000
|
ConfirmModal,
|
|
6825
7001
|
{
|
|
6826
7002
|
headerProps: {
|
|
6827
7003
|
...headerProps,
|
|
6828
|
-
titleText: headerProps?.titleText ?? translation
|
|
6829
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7004
|
+
titleText: headerProps?.titleText ?? translation("unsavedChanges"),
|
|
7005
|
+
descriptionText: headerProps?.descriptionText ?? translation("unsavedChangesSaveQuestion")
|
|
6830
7006
|
},
|
|
6831
7007
|
onConfirm: onSave,
|
|
6832
7008
|
onCancel,
|
|
6833
7009
|
onDecline: onDontSave,
|
|
6834
|
-
buttonOverwrites: [{ text: translation
|
|
7010
|
+
buttonOverwrites: [{ text: translation("cancel") }, { text: translation("discardChanges") }, { text: translation("save") }],
|
|
6835
7011
|
...modalProps,
|
|
6836
7012
|
children
|
|
6837
7013
|
}
|
|
@@ -6856,99 +7032,107 @@ var InputModal = ({
|
|
|
6856
7032
|
};
|
|
6857
7033
|
|
|
6858
7034
|
// src/components/user-action/Select.tsx
|
|
6859
|
-
import {
|
|
6860
|
-
import {
|
|
6861
|
-
import { useEffect as useEffect17, useState as useState19 } from "react";
|
|
7035
|
+
import { ChevronDown as ChevronDown5, ChevronUp as ChevronUp4 } from "lucide-react";
|
|
7036
|
+
import { useEffect as useEffect18, useRef as useRef7, useState as useState19 } from "react";
|
|
6862
7037
|
import clsx33 from "clsx";
|
|
6863
|
-
|
|
7038
|
+
|
|
7039
|
+
// src/hooks/useOutsideClick.ts
|
|
7040
|
+
import { useEffect as useEffect17 } from "react";
|
|
7041
|
+
var useOutsideClick = (refs, handler) => {
|
|
7042
|
+
useEffect17(() => {
|
|
7043
|
+
const listener = (event) => {
|
|
7044
|
+
if (event.target === null) return;
|
|
7045
|
+
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
7046
|
+
return;
|
|
7047
|
+
}
|
|
7048
|
+
handler();
|
|
7049
|
+
};
|
|
7050
|
+
document.addEventListener("mousedown", listener);
|
|
7051
|
+
document.addEventListener("touchstart", listener);
|
|
7052
|
+
return () => {
|
|
7053
|
+
document.removeEventListener("mousedown", listener);
|
|
7054
|
+
document.removeEventListener("touchstart", listener);
|
|
7055
|
+
};
|
|
7056
|
+
}, [refs, handler]);
|
|
7057
|
+
};
|
|
7058
|
+
|
|
7059
|
+
// src/components/user-action/Select.tsx
|
|
7060
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6864
7061
|
var Select = ({
|
|
6865
7062
|
value,
|
|
6866
7063
|
label,
|
|
6867
7064
|
options,
|
|
6868
7065
|
onChange,
|
|
6869
|
-
isHidingCurrentValue = true,
|
|
6870
7066
|
hintText = "",
|
|
6871
|
-
showDisabledOptions = true,
|
|
6872
7067
|
isDisabled,
|
|
7068
|
+
isSearchEnabled = false,
|
|
6873
7069
|
className,
|
|
6874
|
-
textColor = "text-menu-text",
|
|
6875
|
-
additionalItems,
|
|
6876
7070
|
selectedDisplayOverwrite
|
|
6877
7071
|
}) => {
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
7072
|
+
const triggerRef = useRef7(null);
|
|
7073
|
+
const menuRef = useRef7(null);
|
|
7074
|
+
const [isOpen, setIsOpen] = useState19(false);
|
|
7075
|
+
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
6882
7076
|
const selectedOption = options.find((option) => option.value === value);
|
|
6883
7077
|
if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
|
|
6884
7078
|
console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
|
|
6885
7079
|
}
|
|
6886
|
-
const
|
|
7080
|
+
const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
|
|
6887
7081
|
return /* @__PURE__ */ jsxs29("div", { className: clsx33(className), children: [
|
|
6888
7082
|
label && /* @__PURE__ */ jsx42(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx33("mb-1", label.className) }),
|
|
6889
|
-
/* @__PURE__ */
|
|
7083
|
+
/* @__PURE__ */ jsxs29("div", { className: "relative", children: [
|
|
6890
7084
|
/* @__PURE__ */ jsxs29(
|
|
6891
|
-
|
|
7085
|
+
"button",
|
|
6892
7086
|
{
|
|
7087
|
+
ref: triggerRef,
|
|
6893
7088
|
className: clsx33(
|
|
6894
|
-
"
|
|
6895
|
-
textColor,
|
|
6896
|
-
borderColor,
|
|
7089
|
+
"btn-md justify-between w-full border-2",
|
|
6897
7090
|
{
|
|
6898
7091
|
"rounded-b-lg": !open,
|
|
6899
|
-
"hover:border-primary": !isDisabled,
|
|
6900
|
-
"bg-disabled-background cursor-not-allowed
|
|
7092
|
+
"bg-menu-background border-menu-border hover:border-primary": !isDisabled,
|
|
7093
|
+
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
|
|
6901
7094
|
}
|
|
6902
7095
|
),
|
|
7096
|
+
onClick: () => setIsOpen(!isOpen),
|
|
6903
7097
|
disabled: isDisabled,
|
|
6904
7098
|
children: [
|
|
6905
|
-
/* @__PURE__ */ jsx42("span", { children: selectedDisplayOverwrite ?? selectedOption?.label
|
|
6906
|
-
|
|
7099
|
+
!isShowingHint && /* @__PURE__ */ jsx42("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
|
|
7100
|
+
isShowingHint && /* @__PURE__ */ jsx42("span", { className: "textstyle-description", children: hintText }),
|
|
7101
|
+
isOpen ? /* @__PURE__ */ jsx42(ChevronUp4, {}) : /* @__PURE__ */ jsx42(ChevronDown5, {})
|
|
6907
7102
|
]
|
|
6908
7103
|
}
|
|
6909
7104
|
),
|
|
6910
|
-
/* @__PURE__ */
|
|
6911
|
-
|
|
7105
|
+
isOpen && /* @__PURE__ */ jsx42(
|
|
7106
|
+
"div",
|
|
6912
7107
|
{
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
"px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0 cursor-pointer",
|
|
6930
|
-
option.className,
|
|
6931
|
-
borderColor,
|
|
6932
|
-
{
|
|
6933
|
-
"brightness-90": option.value === value,
|
|
6934
|
-
"brightness-95": index % 2 === 1,
|
|
6935
|
-
"text-disabled bg-disabled-background cursor-not-allowed": !!option.disabled,
|
|
6936
|
-
"bg-menu-background text-menu-text hover:brightness-90 cursor-pointer": !option.disabled,
|
|
6937
|
-
"rounded-b-lg": index === filteredOptions.length - 1
|
|
6938
|
-
}
|
|
6939
|
-
),
|
|
6940
|
-
onClick: () => {
|
|
6941
|
-
if (!option.disabled) {
|
|
7108
|
+
ref: menuRef,
|
|
7109
|
+
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-md max-h-[500px] overflow-y-auto p-2",
|
|
7110
|
+
children: /* @__PURE__ */ jsx42(
|
|
7111
|
+
SearchableList,
|
|
7112
|
+
{
|
|
7113
|
+
list: options,
|
|
7114
|
+
minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
|
|
7115
|
+
searchMapping: (item) => item.searchTags,
|
|
7116
|
+
itemMapper: (option, index) => /* @__PURE__ */ jsx42(
|
|
7117
|
+
Tile,
|
|
7118
|
+
{
|
|
7119
|
+
isSelected: selectedOption?.value === option.value,
|
|
7120
|
+
className: "px-2 py-1 rounded-md",
|
|
7121
|
+
disabledClassName: "text-disabled-text cursor-not-allowed",
|
|
7122
|
+
title: { value: option.label, className: "font-semibold" },
|
|
7123
|
+
onClick: () => {
|
|
6942
7124
|
onChange(option.value);
|
|
6943
|
-
|
|
7125
|
+
setIsOpen(false);
|
|
7126
|
+
},
|
|
7127
|
+
isDisabled: option.disabled
|
|
6944
7128
|
},
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
7129
|
+
index
|
|
7130
|
+
)
|
|
7131
|
+
}
|
|
7132
|
+
)
|
|
6949
7133
|
}
|
|
6950
7134
|
)
|
|
6951
|
-
] })
|
|
7135
|
+
] })
|
|
6952
7136
|
] });
|
|
6953
7137
|
};
|
|
6954
7138
|
var SelectUncontrolled = ({
|
|
@@ -6959,7 +7143,7 @@ var SelectUncontrolled = ({
|
|
|
6959
7143
|
...props
|
|
6960
7144
|
}) => {
|
|
6961
7145
|
const [selected, setSelected] = useState19(value);
|
|
6962
|
-
|
|
7146
|
+
useEffect18(() => {
|
|
6963
7147
|
if (options.find((options2) => options2.value === value)) {
|
|
6964
7148
|
setSelected(value);
|
|
6965
7149
|
}
|
|
@@ -6978,40 +7162,19 @@ var SelectUncontrolled = ({
|
|
|
6978
7162
|
}
|
|
6979
7163
|
);
|
|
6980
7164
|
};
|
|
6981
|
-
var SearchableSelect = ({
|
|
6982
|
-
value,
|
|
6983
|
-
options,
|
|
6984
|
-
searchMapping,
|
|
6985
|
-
...selectProps
|
|
6986
|
-
}) => {
|
|
6987
|
-
const [search, setSearch] = useState19("");
|
|
6988
|
-
const filteredOptions = MultiSearchWithMapping(search, options, searchMapping);
|
|
6989
|
-
return /* @__PURE__ */ jsx42(
|
|
6990
|
-
Select,
|
|
6991
|
-
{
|
|
6992
|
-
value,
|
|
6993
|
-
options: filteredOptions,
|
|
6994
|
-
additionalItems: [/* @__PURE__ */ jsxs29("div", { className: "row gap-x-2 items-center", children: [
|
|
6995
|
-
/* @__PURE__ */ jsx42(Input, { autoFocus: true, value: search, onChangeText: setSearch, className: "w-full" }),
|
|
6996
|
-
/* @__PURE__ */ jsx42(Search2, { className: "min-w-[1.5rem] min-h-[1.5rem]" })
|
|
6997
|
-
] }, "selectSearch")],
|
|
6998
|
-
...selectProps
|
|
6999
|
-
}
|
|
7000
|
-
);
|
|
7001
|
-
};
|
|
7002
7165
|
|
|
7003
7166
|
// src/components/modals/LanguageModal.tsx
|
|
7004
7167
|
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7005
7168
|
var defaultLanguageModalTranslation = {
|
|
7006
7169
|
en: {
|
|
7007
|
-
|
|
7008
|
-
|
|
7170
|
+
language: "Language",
|
|
7171
|
+
chooseLanguage: "Choose your language",
|
|
7009
7172
|
done: "Done",
|
|
7010
7173
|
...LanguageUtil.languagesLocalNames
|
|
7011
7174
|
},
|
|
7012
7175
|
de: {
|
|
7013
|
-
|
|
7014
|
-
|
|
7176
|
+
language: "Sprache",
|
|
7177
|
+
chooseLanguage: "W\xE4hle deine bevorzugte Sprache",
|
|
7015
7178
|
done: "Fertig",
|
|
7016
7179
|
...LanguageUtil.languagesLocalNames
|
|
7017
7180
|
}
|
|
@@ -7023,14 +7186,14 @@ var LanguageModal = ({
|
|
|
7023
7186
|
...modalProps
|
|
7024
7187
|
}) => {
|
|
7025
7188
|
const { language, setLanguage } = useLanguage();
|
|
7026
|
-
const translation = useTranslation(defaultLanguageModalTranslation, overwriteTranslation);
|
|
7189
|
+
const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
|
|
7027
7190
|
return /* @__PURE__ */ jsx43(
|
|
7028
7191
|
Modal,
|
|
7029
7192
|
{
|
|
7030
7193
|
headerProps: {
|
|
7031
7194
|
...headerProps,
|
|
7032
|
-
titleText: headerProps?.titleText ?? translation
|
|
7033
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7195
|
+
titleText: headerProps?.titleText ?? translation("language"),
|
|
7196
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseLanguage")
|
|
7034
7197
|
},
|
|
7035
7198
|
onClose,
|
|
7036
7199
|
...modalProps,
|
|
@@ -7044,24 +7207,32 @@ var LanguageModal = ({
|
|
|
7044
7207
|
onChange: (language2) => setLanguage(language2)
|
|
7045
7208
|
}
|
|
7046
7209
|
),
|
|
7047
|
-
/* @__PURE__ */ jsx43("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx43(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation
|
|
7210
|
+
/* @__PURE__ */ jsx43("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx43(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
7048
7211
|
] })
|
|
7049
7212
|
}
|
|
7050
7213
|
);
|
|
7051
7214
|
};
|
|
7052
7215
|
|
|
7053
7216
|
// src/theming/useTheme.tsx
|
|
7054
|
-
import { createContext as createContext2, useContext as useContext2, useEffect as
|
|
7217
|
+
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect19, useState as useState20 } from "react";
|
|
7055
7218
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
7056
7219
|
var themes = ["light", "dark"];
|
|
7057
7220
|
var defaultThemeTypeTranslation = {
|
|
7058
7221
|
en: {
|
|
7059
7222
|
dark: "Dark",
|
|
7060
|
-
light: "Light"
|
|
7223
|
+
light: "Light",
|
|
7224
|
+
theme: {
|
|
7225
|
+
one: "Theme",
|
|
7226
|
+
other: "Themes"
|
|
7227
|
+
}
|
|
7061
7228
|
},
|
|
7062
7229
|
de: {
|
|
7063
7230
|
dark: "Dunkel",
|
|
7064
|
-
light: "Hell"
|
|
7231
|
+
light: "Hell",
|
|
7232
|
+
theme: {
|
|
7233
|
+
one: "Farbschema",
|
|
7234
|
+
other: "Farbschemas"
|
|
7235
|
+
}
|
|
7065
7236
|
}
|
|
7066
7237
|
};
|
|
7067
7238
|
var ThemeUtil = {
|
|
@@ -7074,13 +7245,13 @@ var ThemeContext = createContext2({
|
|
|
7074
7245
|
});
|
|
7075
7246
|
var ThemeProvider = ({ children, initialTheme = "light" }) => {
|
|
7076
7247
|
const [theme, setTheme] = useState20(initialTheme);
|
|
7077
|
-
|
|
7248
|
+
useEffect19(() => {
|
|
7078
7249
|
if (theme !== initialTheme) {
|
|
7079
7250
|
console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
|
|
7080
7251
|
setTheme(initialTheme);
|
|
7081
7252
|
}
|
|
7082
7253
|
}, [initialTheme]);
|
|
7083
|
-
|
|
7254
|
+
useEffect19(() => {
|
|
7084
7255
|
document.documentElement.setAttribute("data-theme", theme);
|
|
7085
7256
|
}, [theme]);
|
|
7086
7257
|
return /* @__PURE__ */ jsx44(ThemeContext.Provider, { value: { theme, setTheme }, children });
|
|
@@ -7089,18 +7260,12 @@ var useTheme = () => useContext2(ThemeContext);
|
|
|
7089
7260
|
|
|
7090
7261
|
// src/components/modals/ThemeModal.tsx
|
|
7091
7262
|
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7092
|
-
var
|
|
7263
|
+
var defaultConfirmDialogTranslation = {
|
|
7093
7264
|
en: {
|
|
7094
|
-
|
|
7095
|
-
message: "Choose your preferred theme",
|
|
7096
|
-
done: "Done",
|
|
7097
|
-
...ThemeUtil.translation.en
|
|
7265
|
+
chooseTheme: "Choose your preferred theme"
|
|
7098
7266
|
},
|
|
7099
7267
|
de: {
|
|
7100
|
-
|
|
7101
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
7102
|
-
done: "Fertig",
|
|
7103
|
-
...ThemeUtil.translation.en
|
|
7268
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
7104
7269
|
}
|
|
7105
7270
|
};
|
|
7106
7271
|
var ThemeModal = ({
|
|
@@ -7110,14 +7275,14 @@ var ThemeModal = ({
|
|
|
7110
7275
|
...modalProps
|
|
7111
7276
|
}) => {
|
|
7112
7277
|
const { theme, setTheme } = useTheme();
|
|
7113
|
-
const translation = useTranslation(
|
|
7278
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
7114
7279
|
return /* @__PURE__ */ jsx45(
|
|
7115
7280
|
Modal,
|
|
7116
7281
|
{
|
|
7117
7282
|
headerProps: {
|
|
7118
7283
|
...headerProps,
|
|
7119
|
-
titleText: headerProps?.titleText ?? translation
|
|
7120
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7284
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
7285
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
7121
7286
|
},
|
|
7122
7287
|
onClose,
|
|
7123
7288
|
...modalProps,
|
|
@@ -7131,27 +7296,19 @@ var ThemeModal = ({
|
|
|
7131
7296
|
onChange: (theme2) => setTheme(theme2)
|
|
7132
7297
|
}
|
|
7133
7298
|
),
|
|
7134
|
-
/* @__PURE__ */ jsx45("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx45(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation
|
|
7299
|
+
/* @__PURE__ */ jsx45("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx45(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
7135
7300
|
] })
|
|
7136
7301
|
}
|
|
7137
7302
|
);
|
|
7138
7303
|
};
|
|
7139
7304
|
|
|
7140
7305
|
// src/components/properties/CheckboxProperty.tsx
|
|
7141
|
-
import { Check as
|
|
7306
|
+
import { Check as Check4 } from "lucide-react";
|
|
7142
7307
|
|
|
7143
7308
|
// src/components/properties/PropertyBase.tsx
|
|
7144
7309
|
import { AlertTriangle } from "lucide-react";
|
|
7145
7310
|
import clsx34 from "clsx";
|
|
7146
7311
|
import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7147
|
-
var defaultPropertyBaseTranslation = {
|
|
7148
|
-
en: {
|
|
7149
|
-
remove: "Remove"
|
|
7150
|
-
},
|
|
7151
|
-
de: {
|
|
7152
|
-
remove: "Entfernen"
|
|
7153
|
-
}
|
|
7154
|
-
};
|
|
7155
7312
|
var PropertyBase = ({
|
|
7156
7313
|
overwriteTranslation,
|
|
7157
7314
|
name,
|
|
@@ -7163,7 +7320,7 @@ var PropertyBase = ({
|
|
|
7163
7320
|
onRemove,
|
|
7164
7321
|
className = ""
|
|
7165
7322
|
}) => {
|
|
7166
|
-
const translation = useTranslation(
|
|
7323
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7167
7324
|
const requiredAndNoValue = softRequired && !hasValue;
|
|
7168
7325
|
return /* @__PURE__ */ jsxs32("div", { className: clsx34("row gap-x-0 group", className), children: [
|
|
7169
7326
|
/* @__PURE__ */ jsxs32(
|
|
@@ -7182,7 +7339,7 @@ var PropertyBase = ({
|
|
|
7182
7339
|
/* @__PURE__ */ jsxs32(
|
|
7183
7340
|
"div",
|
|
7184
7341
|
{
|
|
7185
|
-
className: clsx34("row grow justify-between items-center rounded-r-xl border-2 border-l-0", {
|
|
7342
|
+
className: clsx34("row gap-x-0 grow justify-between items-center rounded-r-xl border-2 border-l-0", {
|
|
7186
7343
|
"bg-surface group-hover:border-primary": !requiredAndNoValue,
|
|
7187
7344
|
"bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
|
|
7188
7345
|
}, className),
|
|
@@ -7196,7 +7353,7 @@ var PropertyBase = ({
|
|
|
7196
7353
|
color: "negative",
|
|
7197
7354
|
className: clsx34("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
|
|
7198
7355
|
disabled: !hasValue || readOnly,
|
|
7199
|
-
children: translation
|
|
7356
|
+
children: translation("remove")
|
|
7200
7357
|
}
|
|
7201
7358
|
)
|
|
7202
7359
|
]
|
|
@@ -7207,16 +7364,6 @@ var PropertyBase = ({
|
|
|
7207
7364
|
|
|
7208
7365
|
// src/components/properties/CheckboxProperty.tsx
|
|
7209
7366
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
7210
|
-
var defaultCheckboxPropertyTranslation = {
|
|
7211
|
-
en: {
|
|
7212
|
-
yes: "Yes",
|
|
7213
|
-
no: "No"
|
|
7214
|
-
},
|
|
7215
|
-
de: {
|
|
7216
|
-
yes: "Ja",
|
|
7217
|
-
no: "Nein"
|
|
7218
|
-
}
|
|
7219
|
-
};
|
|
7220
7367
|
var CheckboxProperty = ({
|
|
7221
7368
|
overwriteTranslation,
|
|
7222
7369
|
value,
|
|
@@ -7224,21 +7371,21 @@ var CheckboxProperty = ({
|
|
|
7224
7371
|
readOnly,
|
|
7225
7372
|
...baseProps
|
|
7226
7373
|
}) => {
|
|
7227
|
-
const translation = useTranslation(
|
|
7374
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7228
7375
|
return /* @__PURE__ */ jsx47(
|
|
7229
7376
|
PropertyBase,
|
|
7230
7377
|
{
|
|
7231
7378
|
...baseProps,
|
|
7232
7379
|
hasValue: true,
|
|
7233
7380
|
readOnly,
|
|
7234
|
-
icon: /* @__PURE__ */ jsx47(
|
|
7381
|
+
icon: /* @__PURE__ */ jsx47(Check4, { size: 16 }),
|
|
7235
7382
|
input: () => /* @__PURE__ */ jsx47("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ jsx47(
|
|
7236
7383
|
Checkbox,
|
|
7237
7384
|
{
|
|
7238
7385
|
checked: value ?? true,
|
|
7239
7386
|
disabled: readOnly,
|
|
7240
7387
|
onChange,
|
|
7241
|
-
label: { name: `${translation
|
|
7388
|
+
label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" }
|
|
7242
7389
|
}
|
|
7243
7390
|
) })
|
|
7244
7391
|
}
|
|
@@ -7296,221 +7443,167 @@ var DateProperty = ({
|
|
|
7296
7443
|
|
|
7297
7444
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7298
7445
|
import { List } from "lucide-react";
|
|
7299
|
-
import clsx38 from "clsx";
|
|
7300
|
-
|
|
7301
|
-
// src/components/user-action/MultiSelect.tsx
|
|
7302
|
-
import { useState as useState21 } from "react";
|
|
7303
|
-
import { Search as Search3 } from "lucide-react";
|
|
7304
7446
|
import clsx37 from "clsx";
|
|
7305
7447
|
|
|
7306
|
-
// src/components/user-action/
|
|
7307
|
-
import { useRef as
|
|
7448
|
+
// src/components/user-action/MultiSelect.tsx
|
|
7449
|
+
import { useEffect as useEffect20, useRef as useRef8, useState as useState21 } from "react";
|
|
7450
|
+
import { ChevronDown as ChevronDown6, ChevronUp as ChevronUp5 } from "lucide-react";
|
|
7308
7451
|
import clsx36 from "clsx";
|
|
7309
|
-
|
|
7310
|
-
// src/hooks/useOutsideClick.ts
|
|
7311
|
-
import { useEffect as useEffect19 } from "react";
|
|
7312
|
-
var useOutsideClick = (refs, handler) => {
|
|
7313
|
-
useEffect19(() => {
|
|
7314
|
-
const listener = (event) => {
|
|
7315
|
-
if (event.target === null) return;
|
|
7316
|
-
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
7317
|
-
return;
|
|
7318
|
-
}
|
|
7319
|
-
handler();
|
|
7320
|
-
};
|
|
7321
|
-
document.addEventListener("mousedown", listener);
|
|
7322
|
-
document.addEventListener("touchstart", listener);
|
|
7323
|
-
return () => {
|
|
7324
|
-
document.removeEventListener("mousedown", listener);
|
|
7325
|
-
document.removeEventListener("touchstart", listener);
|
|
7326
|
-
};
|
|
7327
|
-
}, [refs, handler]);
|
|
7328
|
-
};
|
|
7329
|
-
|
|
7330
|
-
// src/components/user-action/Menu.tsx
|
|
7331
7452
|
import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7332
|
-
var MenuItem = ({
|
|
7333
|
-
children,
|
|
7334
|
-
onClick,
|
|
7335
|
-
alignment = "left",
|
|
7336
|
-
className
|
|
7337
|
-
}) => /* @__PURE__ */ jsx49(
|
|
7338
|
-
"div",
|
|
7339
|
-
{
|
|
7340
|
-
className: clsx36("block px-3 py-1 bg-menu-background text-menu-text hover:brightness-90", {
|
|
7341
|
-
"text-right": alignment === "right",
|
|
7342
|
-
"text-left": alignment === "left"
|
|
7343
|
-
}, className),
|
|
7344
|
-
onClick,
|
|
7345
|
-
children
|
|
7346
|
-
}
|
|
7347
|
-
);
|
|
7348
|
-
var Menu2 = ({
|
|
7349
|
-
trigger,
|
|
7350
|
-
children,
|
|
7351
|
-
alignment = "tl",
|
|
7352
|
-
showOnHover = false,
|
|
7353
|
-
menuClassName = ""
|
|
7354
|
-
}) => {
|
|
7355
|
-
const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
|
|
7356
|
-
const triggerRef = useRef7(null);
|
|
7357
|
-
const menuRef = useRef7(null);
|
|
7358
|
-
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
7359
|
-
return /* @__PURE__ */ jsxs33(
|
|
7360
|
-
"div",
|
|
7361
|
-
{
|
|
7362
|
-
className: "relative",
|
|
7363
|
-
...handlers,
|
|
7364
|
-
children: [
|
|
7365
|
-
trigger(() => setIsOpen(!isOpen), triggerRef),
|
|
7366
|
-
isOpen ? /* @__PURE__ */ jsx49(
|
|
7367
|
-
"div",
|
|
7368
|
-
{
|
|
7369
|
-
ref: menuRef,
|
|
7370
|
-
onClick: (e) => e.stopPropagation(),
|
|
7371
|
-
className: clsx36("absolute top-full mt-1 py-2 w-60 rounded-lg bg-menu-background text-menu-text ring-1 ring-slate-900/5 text-sm leading-6 font-semibold shadow-md z-[1]", {
|
|
7372
|
-
" top-[8px]": alignment[0] === "t",
|
|
7373
|
-
" bottom-[8px]": alignment[0] === "b",
|
|
7374
|
-
" left-[-8px]": alignment[1] === "l",
|
|
7375
|
-
" right-[-8px]": alignment[1] === "r"
|
|
7376
|
-
}, menuClassName),
|
|
7377
|
-
children
|
|
7378
|
-
}
|
|
7379
|
-
) : null
|
|
7380
|
-
]
|
|
7381
|
-
}
|
|
7382
|
-
);
|
|
7383
|
-
};
|
|
7384
|
-
|
|
7385
|
-
// src/components/user-action/MultiSelect.tsx
|
|
7386
|
-
import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7387
7453
|
var defaultMultiSelectTranslation = {
|
|
7388
7454
|
en: {
|
|
7389
|
-
|
|
7390
|
-
search: "Search",
|
|
7391
|
-
selected: "selected"
|
|
7455
|
+
selected: `{{amount}} selected`
|
|
7392
7456
|
},
|
|
7393
7457
|
de: {
|
|
7394
|
-
|
|
7395
|
-
search: "Suche",
|
|
7396
|
-
selected: "ausgew\xE4hlt"
|
|
7458
|
+
selected: `{{amount}} ausgew\xE4hlt`
|
|
7397
7459
|
}
|
|
7398
7460
|
};
|
|
7399
7461
|
var MultiSelect = ({
|
|
7400
7462
|
overwriteTranslation,
|
|
7401
7463
|
options,
|
|
7402
|
-
onChange,
|
|
7403
|
-
search,
|
|
7404
|
-
disabled = false,
|
|
7405
|
-
selectedDisplay,
|
|
7406
7464
|
label,
|
|
7465
|
+
onChange,
|
|
7407
7466
|
hintText,
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7467
|
+
isDisabled = false,
|
|
7468
|
+
isSearchEnabled = false,
|
|
7469
|
+
selectedDisplayOverwrite,
|
|
7470
|
+
useChipDisplay = false,
|
|
7471
|
+
className = ""
|
|
7411
7472
|
}) => {
|
|
7412
|
-
const translation = useTranslation(defaultMultiSelectTranslation, overwriteTranslation);
|
|
7413
|
-
const
|
|
7414
|
-
|
|
7415
|
-
const
|
|
7416
|
-
|
|
7417
|
-
filteredOptions = MultiSearchWithMapping(
|
|
7418
|
-
searchText,
|
|
7419
|
-
filteredOptions,
|
|
7420
|
-
(value) => search.searchMapping(value)
|
|
7421
|
-
);
|
|
7422
|
-
}
|
|
7423
|
-
if (!showDisabledOptions) {
|
|
7424
|
-
filteredOptions = filteredOptions.filter((value) => !value.disabled);
|
|
7425
|
-
}
|
|
7473
|
+
const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
|
|
7474
|
+
const triggerRef = useRef8(null);
|
|
7475
|
+
const menuRef = useRef8(null);
|
|
7476
|
+
const [isOpen, setIsOpen] = useState21(false);
|
|
7477
|
+
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
7426
7478
|
const selectedItems = options.filter((value) => value.selected);
|
|
7427
|
-
const
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
label && /* @__PURE__ */ jsx50(
|
|
7479
|
+
const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
|
|
7480
|
+
return /* @__PURE__ */ jsxs33("div", { className: clsx36(className), children: [
|
|
7481
|
+
label && /* @__PURE__ */ jsx49(
|
|
7431
7482
|
Label,
|
|
7432
7483
|
{
|
|
7433
7484
|
...label,
|
|
7434
7485
|
htmlFor: label.name,
|
|
7435
|
-
className:
|
|
7486
|
+
className: clsx36(" mb-1", label.className),
|
|
7436
7487
|
labelType: label.labelType ?? "labelBig"
|
|
7437
7488
|
}
|
|
7438
7489
|
),
|
|
7439
|
-
/* @__PURE__ */
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
ref,
|
|
7447
|
-
onClick: disabled ? void 0 : onClick,
|
|
7448
|
-
className: clsx37(
|
|
7449
|
-
borderColor,
|
|
7450
|
-
"bg-menu-background text-menu-text inline-w-full justify-between items-center rounded-lg border-2 px-4 py-2 font-medium",
|
|
7451
|
-
{
|
|
7452
|
-
"hover:border-primary cursor-pointer": !disabled,
|
|
7453
|
-
"bg-disabled-background text-disabled cursor-not-allowed": disabled
|
|
7454
|
-
},
|
|
7455
|
-
triggerClassName
|
|
7456
|
-
),
|
|
7457
|
-
children: selectedDisplay ? selectedDisplay({ items: options, disabled }) : menuButtonText
|
|
7458
|
-
}
|
|
7459
|
-
),
|
|
7460
|
-
menuClassName: clsx37(
|
|
7461
|
-
"!rounded-lg !shadow-lg !max-h-[500px] !min-w-[400px] !max-w-[70vh] !overflow-y-auto !border !border-2",
|
|
7462
|
-
borderColor,
|
|
7463
|
-
{ "!py-0": !enableSearch, "!pb-0": enableSearch }
|
|
7464
|
-
),
|
|
7465
|
-
children: [
|
|
7466
|
-
enableSearch && /* @__PURE__ */ jsxs34("div", { className: "row gap-x-2 items-center px-2 py-2", children: [
|
|
7467
|
-
/* @__PURE__ */ jsx50(Input, { autoFocus: true, className: "w-full", value: searchText, onChangeText: setSearchText }),
|
|
7468
|
-
/* @__PURE__ */ jsx50(Search3, {})
|
|
7469
|
-
] }, "selectSearch"),
|
|
7470
|
-
filteredOptions.map((option, index) => /* @__PURE__ */ jsx50(
|
|
7471
|
-
MenuItem,
|
|
7490
|
+
/* @__PURE__ */ jsxs33("div", { className: "relative", children: [
|
|
7491
|
+
/* @__PURE__ */ jsxs33(
|
|
7492
|
+
"button",
|
|
7493
|
+
{
|
|
7494
|
+
ref: triggerRef,
|
|
7495
|
+
className: clsx36(
|
|
7496
|
+
"btn-md justify-between w-full border-2 h-auto",
|
|
7472
7497
|
{
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7498
|
+
"rounded-b-lg": !open,
|
|
7499
|
+
"bg-menu-background border-menu-border hover:border-primary": !isDisabled,
|
|
7500
|
+
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
|
|
7501
|
+
}
|
|
7502
|
+
),
|
|
7503
|
+
onClick: () => setIsOpen(!isOpen),
|
|
7504
|
+
disabled: isDisabled,
|
|
7505
|
+
children: [
|
|
7506
|
+
!isShowingHint && /* @__PURE__ */ jsx49("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? (useChipDisplay && selectedItems ? /* @__PURE__ */ jsx49(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) : translation("selected", { replacements: { amount: selectedItems.length.toString() } })) }),
|
|
7507
|
+
isShowingHint && /* @__PURE__ */ jsx49("span", { className: "textstyle-description", children: hintText ?? translation("select") }),
|
|
7508
|
+
isOpen ? /* @__PURE__ */ jsx49(ChevronUp5, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ jsx49(ChevronDown6, { className: "min-w-6" })
|
|
7509
|
+
]
|
|
7510
|
+
}
|
|
7511
|
+
),
|
|
7512
|
+
isOpen && /* @__PURE__ */ jsxs33(
|
|
7513
|
+
"div",
|
|
7514
|
+
{
|
|
7515
|
+
ref: menuRef,
|
|
7516
|
+
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-md max-h-[500px] overflow-y-auto p-2",
|
|
7517
|
+
children: [
|
|
7518
|
+
/* @__PURE__ */ jsx49(
|
|
7519
|
+
SearchableList,
|
|
7520
|
+
{
|
|
7521
|
+
list: options,
|
|
7522
|
+
minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
|
|
7523
|
+
searchMapping: (item) => item.searchTags,
|
|
7524
|
+
itemMapper: (option, index) => /* @__PURE__ */ jsx49(
|
|
7525
|
+
Tile,
|
|
7526
|
+
{
|
|
7527
|
+
isSelected: option.selected,
|
|
7528
|
+
className: "px-2 py-1 rounded-md",
|
|
7529
|
+
disabledClassName: "text-disabled-text cursor-not-allowed",
|
|
7530
|
+
title: { value: option.label, className: "font-semibold" },
|
|
7531
|
+
onClick: () => {
|
|
7483
7532
|
onChange(options.map((value) => value.value === option.value ? {
|
|
7484
7533
|
...option,
|
|
7485
7534
|
selected: !value.selected
|
|
7486
7535
|
} : value));
|
|
7487
|
-
}
|
|
7536
|
+
},
|
|
7537
|
+
isDisabled: option.disabled
|
|
7488
7538
|
},
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7539
|
+
index
|
|
7540
|
+
)
|
|
7541
|
+
}
|
|
7542
|
+
),
|
|
7543
|
+
/* @__PURE__ */ jsxs33("div", { className: "row justify-between mt-2", children: [
|
|
7544
|
+
/* @__PURE__ */ jsxs33("div", { className: "row gap-x-2", children: [
|
|
7545
|
+
/* @__PURE__ */ jsx49(
|
|
7546
|
+
SolidButton,
|
|
7547
|
+
{
|
|
7548
|
+
color: "neutral",
|
|
7549
|
+
size: "small",
|
|
7550
|
+
onClick: () => {
|
|
7551
|
+
onChange(options.map((option) => ({
|
|
7552
|
+
...option,
|
|
7553
|
+
selected: !option.disabled
|
|
7554
|
+
})));
|
|
7555
|
+
},
|
|
7556
|
+
disabled: options.every((value) => value.selected || value.disabled),
|
|
7557
|
+
children: translation("all")
|
|
7558
|
+
}
|
|
7559
|
+
),
|
|
7560
|
+
/* @__PURE__ */ jsx49(
|
|
7561
|
+
SolidButton,
|
|
7562
|
+
{
|
|
7563
|
+
color: "neutral",
|
|
7564
|
+
size: "small",
|
|
7565
|
+
onClick: () => {
|
|
7566
|
+
onChange(options.map((option) => ({
|
|
7567
|
+
...option,
|
|
7568
|
+
selected: false
|
|
7569
|
+
})));
|
|
7570
|
+
},
|
|
7571
|
+
children: translation("none")
|
|
7572
|
+
}
|
|
7573
|
+
)
|
|
7574
|
+
] }),
|
|
7575
|
+
/* @__PURE__ */ jsx49(SolidButton, { size: "small", onClick: () => setIsOpen(false), children: "Done" })
|
|
7576
|
+
] })
|
|
7577
|
+
]
|
|
7578
|
+
}
|
|
7579
|
+
)
|
|
7580
|
+
] })
|
|
7501
7581
|
] });
|
|
7502
7582
|
};
|
|
7583
|
+
var MultiSelectUncontrolled = ({
|
|
7584
|
+
options,
|
|
7585
|
+
onChange,
|
|
7586
|
+
...props
|
|
7587
|
+
}) => {
|
|
7588
|
+
const [usedOptions, setUsedOptions] = useState21(options);
|
|
7589
|
+
useEffect20(() => {
|
|
7590
|
+
setUsedOptions(options);
|
|
7591
|
+
}, [options]);
|
|
7592
|
+
return /* @__PURE__ */ jsx49(
|
|
7593
|
+
MultiSelect,
|
|
7594
|
+
{
|
|
7595
|
+
...props,
|
|
7596
|
+
options: usedOptions,
|
|
7597
|
+
onChange: (options2) => {
|
|
7598
|
+
setUsedOptions(options2);
|
|
7599
|
+
onChange(options2);
|
|
7600
|
+
}
|
|
7601
|
+
}
|
|
7602
|
+
);
|
|
7603
|
+
};
|
|
7503
7604
|
|
|
7504
7605
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7505
|
-
import { jsx as
|
|
7506
|
-
var defaultMultiSelectPropertyTranslation = {
|
|
7507
|
-
en: {
|
|
7508
|
-
select: "Select"
|
|
7509
|
-
},
|
|
7510
|
-
de: {
|
|
7511
|
-
select: "Ausw\xE4hlen"
|
|
7512
|
-
}
|
|
7513
|
-
};
|
|
7606
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
7514
7607
|
var MultiSelectProperty = ({
|
|
7515
7608
|
overwriteTranslation,
|
|
7516
7609
|
options,
|
|
@@ -7520,13 +7613,9 @@ var MultiSelectProperty = ({
|
|
|
7520
7613
|
onRemove,
|
|
7521
7614
|
...multiSelectProps
|
|
7522
7615
|
}) => {
|
|
7523
|
-
const translation = useTranslation(
|
|
7616
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7524
7617
|
const hasValue = options.some((value) => value.selected);
|
|
7525
|
-
|
|
7526
|
-
if (softRequired && !hasValue) {
|
|
7527
|
-
triggerClassName = "border-warning hover:brightness-90";
|
|
7528
|
-
}
|
|
7529
|
-
return /* @__PURE__ */ jsx51(
|
|
7618
|
+
return /* @__PURE__ */ jsx50(
|
|
7530
7619
|
PropertyBase,
|
|
7531
7620
|
{
|
|
7532
7621
|
name,
|
|
@@ -7534,27 +7623,20 @@ var MultiSelectProperty = ({
|
|
|
7534
7623
|
readOnly,
|
|
7535
7624
|
softRequired,
|
|
7536
7625
|
hasValue,
|
|
7537
|
-
icon: /* @__PURE__ */
|
|
7538
|
-
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */
|
|
7626
|
+
icon: /* @__PURE__ */ jsx50(List, { size: 16 }),
|
|
7627
|
+
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx50(
|
|
7539
7628
|
"div",
|
|
7540
7629
|
{
|
|
7541
|
-
className:
|
|
7542
|
-
children: /* @__PURE__ */
|
|
7630
|
+
className: clsx37("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
|
|
7631
|
+
children: /* @__PURE__ */ jsx50(
|
|
7543
7632
|
MultiSelect,
|
|
7544
7633
|
{
|
|
7545
7634
|
...multiSelectProps,
|
|
7546
|
-
className:
|
|
7547
|
-
triggerClassName,
|
|
7548
|
-
selectedDisplay: ({ items }) => {
|
|
7549
|
-
const selected = items.filter((value) => value.selected);
|
|
7550
|
-
if (selected.length === 0) {
|
|
7551
|
-
return /* @__PURE__ */ jsx51("span", { children: "Select" });
|
|
7552
|
-
}
|
|
7553
|
-
return /* @__PURE__ */ jsx51(ChipList, { list: selected.map((value) => ({ children: value.label })) });
|
|
7554
|
-
},
|
|
7635
|
+
className: clsx37("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
|
|
7555
7636
|
options,
|
|
7556
|
-
|
|
7557
|
-
|
|
7637
|
+
isDisabled: readOnly,
|
|
7638
|
+
useChipDisplay: true,
|
|
7639
|
+
hintText: `${translation("select")}...`
|
|
7558
7640
|
}
|
|
7559
7641
|
)
|
|
7560
7642
|
}
|
|
@@ -7565,8 +7647,8 @@ var MultiSelectProperty = ({
|
|
|
7565
7647
|
|
|
7566
7648
|
// src/components/properties/NumberProperty.tsx
|
|
7567
7649
|
import { Binary } from "lucide-react";
|
|
7568
|
-
import
|
|
7569
|
-
import { jsx as
|
|
7650
|
+
import clsx38 from "clsx";
|
|
7651
|
+
import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7570
7652
|
var defaultNumberPropertyTranslation = {
|
|
7571
7653
|
en: {
|
|
7572
7654
|
value: "Value"
|
|
@@ -7585,29 +7667,29 @@ var NumberProperty = ({
|
|
|
7585
7667
|
suffix,
|
|
7586
7668
|
...baseProps
|
|
7587
7669
|
}) => {
|
|
7588
|
-
const translation = useTranslation(defaultNumberPropertyTranslation, overwriteTranslation);
|
|
7670
|
+
const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
|
|
7589
7671
|
const hasValue = value !== void 0;
|
|
7590
|
-
return /* @__PURE__ */
|
|
7672
|
+
return /* @__PURE__ */ jsx51(
|
|
7591
7673
|
PropertyBase,
|
|
7592
7674
|
{
|
|
7593
7675
|
...baseProps,
|
|
7594
7676
|
onRemove,
|
|
7595
7677
|
hasValue,
|
|
7596
|
-
icon: /* @__PURE__ */
|
|
7597
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
7678
|
+
icon: /* @__PURE__ */ jsx51(Binary, { size: 16 }),
|
|
7679
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsxs34(
|
|
7598
7680
|
"div",
|
|
7599
7681
|
{
|
|
7600
|
-
className:
|
|
7682
|
+
className: clsx38("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
|
|
7601
7683
|
children: [
|
|
7602
|
-
/* @__PURE__ */
|
|
7684
|
+
/* @__PURE__ */ jsx51(
|
|
7603
7685
|
Input,
|
|
7604
7686
|
{
|
|
7605
7687
|
expanded: false,
|
|
7606
|
-
className:
|
|
7688
|
+
className: clsx38("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
7607
7689
|
value: value?.toString() ?? "",
|
|
7608
7690
|
type: "number",
|
|
7609
7691
|
readOnly,
|
|
7610
|
-
placeholder: `${translation
|
|
7692
|
+
placeholder: `${translation("value")}...`,
|
|
7611
7693
|
onChangeText: (value2) => {
|
|
7612
7694
|
const numberValue = parseFloat(value2);
|
|
7613
7695
|
if (isNaN(numberValue)) {
|
|
@@ -7626,7 +7708,7 @@ var NumberProperty = ({
|
|
|
7626
7708
|
}
|
|
7627
7709
|
}
|
|
7628
7710
|
),
|
|
7629
|
-
suffix && /* @__PURE__ */
|
|
7711
|
+
suffix && /* @__PURE__ */ jsx51("span", { className: clsx38("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
|
|
7630
7712
|
]
|
|
7631
7713
|
}
|
|
7632
7714
|
)
|
|
@@ -7636,16 +7718,8 @@ var NumberProperty = ({
|
|
|
7636
7718
|
|
|
7637
7719
|
// src/components/properties/SelectProperty.tsx
|
|
7638
7720
|
import { List as List2 } from "lucide-react";
|
|
7639
|
-
import
|
|
7640
|
-
import { jsx as
|
|
7641
|
-
var defaultSingleSelectPropertyTranslation = {
|
|
7642
|
-
en: {
|
|
7643
|
-
select: "Select"
|
|
7644
|
-
},
|
|
7645
|
-
de: {
|
|
7646
|
-
select: "Ausw\xE4hlen"
|
|
7647
|
-
}
|
|
7648
|
-
};
|
|
7721
|
+
import clsx39 from "clsx";
|
|
7722
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
7649
7723
|
var SingleSelectProperty = ({
|
|
7650
7724
|
overwriteTranslation,
|
|
7651
7725
|
value,
|
|
@@ -7654,11 +7728,11 @@ var SingleSelectProperty = ({
|
|
|
7654
7728
|
readOnly = false,
|
|
7655
7729
|
softRequired,
|
|
7656
7730
|
onRemove,
|
|
7657
|
-
...
|
|
7731
|
+
...selectProps
|
|
7658
7732
|
}) => {
|
|
7659
|
-
const translation = useTranslation(
|
|
7733
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7660
7734
|
const hasValue = value !== void 0;
|
|
7661
|
-
return /* @__PURE__ */
|
|
7735
|
+
return /* @__PURE__ */ jsx52(
|
|
7662
7736
|
PropertyBase,
|
|
7663
7737
|
{
|
|
7664
7738
|
name,
|
|
@@ -7666,20 +7740,20 @@ var SingleSelectProperty = ({
|
|
|
7666
7740
|
readOnly,
|
|
7667
7741
|
softRequired,
|
|
7668
7742
|
hasValue,
|
|
7669
|
-
icon: /* @__PURE__ */
|
|
7670
|
-
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */
|
|
7743
|
+
icon: /* @__PURE__ */ jsx52(List2, { size: 16 }),
|
|
7744
|
+
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx52(
|
|
7671
7745
|
"div",
|
|
7672
7746
|
{
|
|
7673
|
-
className:
|
|
7674
|
-
children: /* @__PURE__ */
|
|
7675
|
-
|
|
7747
|
+
className: clsx39("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
|
|
7748
|
+
children: /* @__PURE__ */ jsx52(
|
|
7749
|
+
Select,
|
|
7676
7750
|
{
|
|
7677
|
-
...
|
|
7751
|
+
...selectProps,
|
|
7678
7752
|
value,
|
|
7679
7753
|
options,
|
|
7680
7754
|
isDisabled: readOnly,
|
|
7681
|
-
className:
|
|
7682
|
-
hintText: `${translation
|
|
7755
|
+
className: clsx39("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
|
|
7756
|
+
hintText: `${translation("select")}...`
|
|
7683
7757
|
}
|
|
7684
7758
|
)
|
|
7685
7759
|
}
|
|
@@ -7690,12 +7764,12 @@ var SingleSelectProperty = ({
|
|
|
7690
7764
|
|
|
7691
7765
|
// src/components/properties/TextProperty.tsx
|
|
7692
7766
|
import { Text } from "lucide-react";
|
|
7693
|
-
import
|
|
7767
|
+
import clsx41 from "clsx";
|
|
7694
7768
|
|
|
7695
7769
|
// src/components/user-action/Textarea.tsx
|
|
7696
|
-
import { useEffect as
|
|
7697
|
-
import
|
|
7698
|
-
import { jsx as
|
|
7770
|
+
import { useEffect as useEffect21, useState as useState22 } from "react";
|
|
7771
|
+
import clsx40 from "clsx";
|
|
7772
|
+
import { jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7699
7773
|
var Textarea = ({
|
|
7700
7774
|
label,
|
|
7701
7775
|
headline,
|
|
@@ -7716,27 +7790,27 @@ var Textarea = ({
|
|
|
7716
7790
|
onEditCompleted(text);
|
|
7717
7791
|
clearUpdateTimer();
|
|
7718
7792
|
};
|
|
7719
|
-
return /* @__PURE__ */
|
|
7720
|
-
label && /* @__PURE__ */
|
|
7793
|
+
return /* @__PURE__ */ jsxs35("div", { className: "w-full", children: [
|
|
7794
|
+
label && /* @__PURE__ */ jsx53(
|
|
7721
7795
|
Label,
|
|
7722
7796
|
{
|
|
7723
7797
|
...label,
|
|
7724
7798
|
htmlFor: id,
|
|
7725
|
-
className:
|
|
7799
|
+
className: clsx40("mb-1", label.className),
|
|
7726
7800
|
labelType: label.labelType ?? "labelSmall"
|
|
7727
7801
|
}
|
|
7728
7802
|
),
|
|
7729
|
-
/* @__PURE__ */
|
|
7803
|
+
/* @__PURE__ */ jsxs35(
|
|
7730
7804
|
"div",
|
|
7731
7805
|
{
|
|
7732
|
-
className: `${
|
|
7806
|
+
className: `${clsx40(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 hover:border-primary rounded-lg": defaultStyle })}`,
|
|
7733
7807
|
children: [
|
|
7734
|
-
headline && /* @__PURE__ */
|
|
7735
|
-
/* @__PURE__ */
|
|
7808
|
+
headline && /* @__PURE__ */ jsx53("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
|
|
7809
|
+
/* @__PURE__ */ jsx53(
|
|
7736
7810
|
"textarea",
|
|
7737
7811
|
{
|
|
7738
7812
|
id,
|
|
7739
|
-
className:
|
|
7813
|
+
className: clsx40("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
|
|
7740
7814
|
"resize-none": !resizable,
|
|
7741
7815
|
"h-32": defaultStyle,
|
|
7742
7816
|
"mt-3": !headline
|
|
@@ -7763,7 +7837,7 @@ var Textarea = ({
|
|
|
7763
7837
|
]
|
|
7764
7838
|
}
|
|
7765
7839
|
),
|
|
7766
|
-
hasFocus && disclaimer && /* @__PURE__ */
|
|
7840
|
+
hasFocus && disclaimer && /* @__PURE__ */ jsx53("label", { className: "text-negative", children: disclaimer })
|
|
7767
7841
|
] });
|
|
7768
7842
|
};
|
|
7769
7843
|
var TextareaUncontrolled = ({
|
|
@@ -7772,10 +7846,10 @@ var TextareaUncontrolled = ({
|
|
|
7772
7846
|
...props
|
|
7773
7847
|
}) => {
|
|
7774
7848
|
const [text, setText] = useState22(value);
|
|
7775
|
-
|
|
7849
|
+
useEffect21(() => {
|
|
7776
7850
|
setText(value);
|
|
7777
7851
|
}, [value]);
|
|
7778
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ jsx53(
|
|
7779
7853
|
Textarea,
|
|
7780
7854
|
{
|
|
7781
7855
|
...props,
|
|
@@ -7789,13 +7863,13 @@ var TextareaUncontrolled = ({
|
|
|
7789
7863
|
};
|
|
7790
7864
|
|
|
7791
7865
|
// src/components/properties/TextProperty.tsx
|
|
7792
|
-
import { jsx as
|
|
7866
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
7793
7867
|
var defaultTextPropertyTranslation = {
|
|
7794
7868
|
en: {
|
|
7795
|
-
|
|
7869
|
+
text: "Text"
|
|
7796
7870
|
},
|
|
7797
7871
|
de: {
|
|
7798
|
-
|
|
7872
|
+
text: "Text"
|
|
7799
7873
|
}
|
|
7800
7874
|
};
|
|
7801
7875
|
var TextProperty = ({
|
|
@@ -7807,28 +7881,28 @@ var TextProperty = ({
|
|
|
7807
7881
|
onEditComplete = noop,
|
|
7808
7882
|
...baseProps
|
|
7809
7883
|
}) => {
|
|
7810
|
-
const translation = useTranslation(defaultTextPropertyTranslation, overwriteTranslation);
|
|
7884
|
+
const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
|
|
7811
7885
|
const hasValue = value !== void 0;
|
|
7812
|
-
return /* @__PURE__ */
|
|
7886
|
+
return /* @__PURE__ */ jsx54(
|
|
7813
7887
|
PropertyBase,
|
|
7814
7888
|
{
|
|
7815
7889
|
...baseProps,
|
|
7816
7890
|
onRemove,
|
|
7817
7891
|
hasValue,
|
|
7818
|
-
icon: /* @__PURE__ */
|
|
7819
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
7892
|
+
icon: /* @__PURE__ */ jsx54(Text, { size: 16 }),
|
|
7893
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx54(
|
|
7820
7894
|
"div",
|
|
7821
7895
|
{
|
|
7822
|
-
className:
|
|
7823
|
-
children: /* @__PURE__ */
|
|
7896
|
+
className: clsx41("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
|
|
7897
|
+
children: /* @__PURE__ */ jsx54(
|
|
7824
7898
|
Textarea,
|
|
7825
7899
|
{
|
|
7826
|
-
className:
|
|
7900
|
+
className: clsx41("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
7827
7901
|
rows: 5,
|
|
7828
7902
|
defaultStyle: false,
|
|
7829
7903
|
value: value ?? "",
|
|
7830
7904
|
readOnly,
|
|
7831
|
-
placeholder: `${translation
|
|
7905
|
+
placeholder: `${translation("text")}...`,
|
|
7832
7906
|
onChangeText: (value2) => {
|
|
7833
7907
|
if (!value2) {
|
|
7834
7908
|
onRemove();
|
|
@@ -7852,48 +7926,8 @@ var TextProperty = ({
|
|
|
7852
7926
|
};
|
|
7853
7927
|
|
|
7854
7928
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
7855
|
-
import
|
|
7856
|
-
import { jsx as
|
|
7857
|
-
var defaultTimeTranslation = {
|
|
7858
|
-
en: {
|
|
7859
|
-
clear: "Clear",
|
|
7860
|
-
change: "Change",
|
|
7861
|
-
year: "Year",
|
|
7862
|
-
month: "Month",
|
|
7863
|
-
day: "Day",
|
|
7864
|
-
january: "January",
|
|
7865
|
-
february: "Febuary",
|
|
7866
|
-
march: "March",
|
|
7867
|
-
april: "April",
|
|
7868
|
-
may: "May",
|
|
7869
|
-
june: "June",
|
|
7870
|
-
july: "July",
|
|
7871
|
-
august: "August",
|
|
7872
|
-
september: "September",
|
|
7873
|
-
october: "October",
|
|
7874
|
-
november: "November",
|
|
7875
|
-
december: "December"
|
|
7876
|
-
},
|
|
7877
|
-
de: {
|
|
7878
|
-
clear: "Entfernen",
|
|
7879
|
-
change: "\xC4ndern",
|
|
7880
|
-
year: "Jahr",
|
|
7881
|
-
month: "Monat",
|
|
7882
|
-
day: "Tag",
|
|
7883
|
-
january: "Januar",
|
|
7884
|
-
february: "Febuar",
|
|
7885
|
-
march: "M\xE4rz",
|
|
7886
|
-
april: "April",
|
|
7887
|
-
may: "Mai",
|
|
7888
|
-
june: "Juni",
|
|
7889
|
-
july: "Juli",
|
|
7890
|
-
august: "August",
|
|
7891
|
-
september: "September",
|
|
7892
|
-
october: "October",
|
|
7893
|
-
november: "November",
|
|
7894
|
-
december: "December"
|
|
7895
|
-
}
|
|
7896
|
-
};
|
|
7929
|
+
import clsx42 from "clsx";
|
|
7930
|
+
import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7897
7931
|
var DateTimePicker = ({
|
|
7898
7932
|
overwriteTranslation,
|
|
7899
7933
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -7906,13 +7940,13 @@ var DateTimePicker = ({
|
|
|
7906
7940
|
timePickerProps,
|
|
7907
7941
|
datePickerProps
|
|
7908
7942
|
}) => {
|
|
7909
|
-
const translation = useTranslation(
|
|
7943
|
+
const translation = useTranslation([formTranslation, timeTranslation], overwriteTranslation);
|
|
7910
7944
|
const useDate = mode === "dateTime" || mode === "date";
|
|
7911
7945
|
const useTime = mode === "dateTime" || mode === "time";
|
|
7912
7946
|
let dateDisplay;
|
|
7913
7947
|
let timeDisplay;
|
|
7914
7948
|
if (useDate) {
|
|
7915
|
-
dateDisplay = /* @__PURE__ */
|
|
7949
|
+
dateDisplay = /* @__PURE__ */ jsx55(
|
|
7916
7950
|
DatePicker,
|
|
7917
7951
|
{
|
|
7918
7952
|
...datePickerProps,
|
|
@@ -7926,38 +7960,118 @@ var DateTimePicker = ({
|
|
|
7926
7960
|
);
|
|
7927
7961
|
}
|
|
7928
7962
|
if (useTime) {
|
|
7929
|
-
timeDisplay = /* @__PURE__ */
|
|
7963
|
+
timeDisplay = /* @__PURE__ */ jsx55(
|
|
7930
7964
|
TimePicker,
|
|
7931
7965
|
{
|
|
7932
7966
|
...timePickerProps,
|
|
7933
|
-
className:
|
|
7967
|
+
className: clsx42("h-full", { "justify-between w-full": mode === "time" }),
|
|
7934
7968
|
maxHeight: 250,
|
|
7935
7969
|
time: value,
|
|
7936
7970
|
onChange
|
|
7937
7971
|
}
|
|
7938
7972
|
);
|
|
7939
7973
|
}
|
|
7940
|
-
return /* @__PURE__ */
|
|
7941
|
-
/* @__PURE__ */
|
|
7974
|
+
return /* @__PURE__ */ jsxs36("div", { className: "col w-fit", children: [
|
|
7975
|
+
/* @__PURE__ */ jsxs36("div", { className: "row gap-x-4", children: [
|
|
7942
7976
|
dateDisplay,
|
|
7943
7977
|
timeDisplay
|
|
7944
7978
|
] }),
|
|
7945
|
-
/* @__PURE__ */
|
|
7946
|
-
/* @__PURE__ */
|
|
7947
|
-
/* @__PURE__ */
|
|
7979
|
+
/* @__PURE__ */ jsx55("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs36("div", { className: "row gap-x-2 mt-1", children: [
|
|
7980
|
+
/* @__PURE__ */ jsx55(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
7981
|
+
/* @__PURE__ */ jsx55(
|
|
7948
7982
|
SolidButton,
|
|
7949
7983
|
{
|
|
7950
7984
|
size: "medium",
|
|
7951
7985
|
onClick: () => onFinish(value),
|
|
7952
|
-
children: translation
|
|
7986
|
+
children: translation("change")
|
|
7953
7987
|
}
|
|
7954
7988
|
)
|
|
7955
7989
|
] }) })
|
|
7956
7990
|
] });
|
|
7957
7991
|
};
|
|
7958
7992
|
|
|
7993
|
+
// src/components/user-action/Menu.tsx
|
|
7994
|
+
import { useRef as useRef9 } from "react";
|
|
7995
|
+
import clsx43 from "clsx";
|
|
7996
|
+
|
|
7997
|
+
// src/util/PropsWithFunctionChildren.ts
|
|
7998
|
+
var resolve = (children, bag) => {
|
|
7999
|
+
if (typeof children === "function") {
|
|
8000
|
+
return children(bag);
|
|
8001
|
+
}
|
|
8002
|
+
return children ?? void 0;
|
|
8003
|
+
};
|
|
8004
|
+
var BagFunctionUtil = {
|
|
8005
|
+
resolve
|
|
8006
|
+
};
|
|
8007
|
+
|
|
8008
|
+
// src/components/user-action/Menu.tsx
|
|
8009
|
+
import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8010
|
+
var MenuItem = ({
|
|
8011
|
+
children,
|
|
8012
|
+
onClick,
|
|
8013
|
+
alignment = "left",
|
|
8014
|
+
isDisabled = false,
|
|
8015
|
+
className
|
|
8016
|
+
}) => /* @__PURE__ */ jsx56(
|
|
8017
|
+
"div",
|
|
8018
|
+
{
|
|
8019
|
+
className: clsx43("block px-3 py-1.5 bg-menu-background first:rounded-t-lg last:rounded-b-lg text-sm font-semibold", {
|
|
8020
|
+
"text-right": alignment === "right",
|
|
8021
|
+
"text-left": alignment === "left",
|
|
8022
|
+
"text-disabled-text cursor-not-allowed": isDisabled,
|
|
8023
|
+
"text-menu-text hover:bg-primary/20": !isDisabled,
|
|
8024
|
+
"cursor-pointer": !!onClick
|
|
8025
|
+
}, className),
|
|
8026
|
+
onClick,
|
|
8027
|
+
children
|
|
8028
|
+
}
|
|
8029
|
+
);
|
|
8030
|
+
var Menu = ({
|
|
8031
|
+
trigger,
|
|
8032
|
+
children,
|
|
8033
|
+
alignment = "tl",
|
|
8034
|
+
showOnHover = false,
|
|
8035
|
+
menuClassName = ""
|
|
8036
|
+
}) => {
|
|
8037
|
+
const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
|
|
8038
|
+
const triggerRef = useRef9(null);
|
|
8039
|
+
const menuRef = useRef9(null);
|
|
8040
|
+
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
8041
|
+
const bag = { isOpen, close: () => setIsOpen(false) };
|
|
8042
|
+
return /* @__PURE__ */ jsxs37(
|
|
8043
|
+
"div",
|
|
8044
|
+
{
|
|
8045
|
+
className: "relative",
|
|
8046
|
+
...handlers,
|
|
8047
|
+
children: [
|
|
8048
|
+
trigger(() => setIsOpen(!isOpen), triggerRef),
|
|
8049
|
+
/* @__PURE__ */ jsx56(
|
|
8050
|
+
"div",
|
|
8051
|
+
{
|
|
8052
|
+
ref: menuRef,
|
|
8053
|
+
onClick: (e) => e.stopPropagation(),
|
|
8054
|
+
className: clsx43(
|
|
8055
|
+
"absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-md z-10",
|
|
8056
|
+
{
|
|
8057
|
+
"top-0": alignment[0] === "t",
|
|
8058
|
+
"bottom-0": alignment[0] === "b",
|
|
8059
|
+
"left-0": alignment[1] === "l",
|
|
8060
|
+
"right-0": alignment[1] === "r",
|
|
8061
|
+
"hidden": !isOpen
|
|
8062
|
+
},
|
|
8063
|
+
menuClassName
|
|
8064
|
+
),
|
|
8065
|
+
children: BagFunctionUtil.resolve(children, bag)
|
|
8066
|
+
}
|
|
8067
|
+
)
|
|
8068
|
+
]
|
|
8069
|
+
}
|
|
8070
|
+
);
|
|
8071
|
+
};
|
|
8072
|
+
|
|
7959
8073
|
// src/components/user-action/ScrollPicker.tsx
|
|
7960
|
-
import { useCallback as useCallback4, useEffect as
|
|
8074
|
+
import { useCallback as useCallback4, useEffect as useEffect22, useState as useState23 } from "react";
|
|
7961
8075
|
import clsx44 from "clsx";
|
|
7962
8076
|
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7963
8077
|
var up = 1;
|
|
@@ -8077,7 +8191,7 @@ var ScrollPicker = ({
|
|
|
8077
8191
|
};
|
|
8078
8192
|
});
|
|
8079
8193
|
}, [disabled, getDirection, onChange]);
|
|
8080
|
-
|
|
8194
|
+
useEffect22(() => {
|
|
8081
8195
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
8082
8196
|
});
|
|
8083
8197
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -8154,7 +8268,7 @@ var ScrollPicker = ({
|
|
|
8154
8268
|
};
|
|
8155
8269
|
|
|
8156
8270
|
// src/components/user-action/ToggleableInput.tsx
|
|
8157
|
-
import { useEffect as
|
|
8271
|
+
import { useEffect as useEffect23, useRef as useRef10, useState as useState24 } from "react";
|
|
8158
8272
|
import { Pencil } from "lucide-react";
|
|
8159
8273
|
import clsx45 from "clsx";
|
|
8160
8274
|
import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
@@ -8173,12 +8287,12 @@ var ToggleableInput = ({
|
|
|
8173
8287
|
}) => {
|
|
8174
8288
|
const [isEditing, setIsEditing] = useState24(initialState !== "display");
|
|
8175
8289
|
const { restartTimer, clearUpdateTimer } = useSaveDelay(() => void 0, 3e3);
|
|
8176
|
-
const ref =
|
|
8290
|
+
const ref = useRef10(null);
|
|
8177
8291
|
const onEditCompletedWrapper = (text) => {
|
|
8178
8292
|
onEditCompleted(text);
|
|
8179
8293
|
clearUpdateTimer();
|
|
8180
8294
|
};
|
|
8181
|
-
|
|
8295
|
+
useEffect23(() => {
|
|
8182
8296
|
if (isEditing) {
|
|
8183
8297
|
ref.current?.focus();
|
|
8184
8298
|
}
|
|
@@ -8244,7 +8358,7 @@ var ToggleableInputUncontrolled = ({
|
|
|
8244
8358
|
...restProps
|
|
8245
8359
|
}) => {
|
|
8246
8360
|
const [value, setValue] = useState24(initialValue);
|
|
8247
|
-
|
|
8361
|
+
useEffect23(() => {
|
|
8248
8362
|
setValue(initialValue);
|
|
8249
8363
|
}, [initialValue]);
|
|
8250
8364
|
return /* @__PURE__ */ jsx58(
|
|
@@ -8304,6 +8418,7 @@ export {
|
|
|
8304
8418
|
ArrayUtil,
|
|
8305
8419
|
Avatar,
|
|
8306
8420
|
AvatarGroup,
|
|
8421
|
+
BagFunctionUtil,
|
|
8307
8422
|
BreadCrumb,
|
|
8308
8423
|
ButtonColorUtil,
|
|
8309
8424
|
ButtonUtil,
|
|
@@ -8348,12 +8463,13 @@ export {
|
|
|
8348
8463
|
LocalStorageService,
|
|
8349
8464
|
LoopingArrayCalculator,
|
|
8350
8465
|
MarkdownInterpreter,
|
|
8351
|
-
|
|
8466
|
+
Menu,
|
|
8352
8467
|
MenuItem,
|
|
8353
8468
|
Modal,
|
|
8354
8469
|
MultiSearchWithMapping,
|
|
8355
8470
|
MultiSelect,
|
|
8356
8471
|
MultiSelectProperty,
|
|
8472
|
+
MultiSelectUncontrolled,
|
|
8357
8473
|
MultiSubjectSearchWithMapping,
|
|
8358
8474
|
NumberProperty,
|
|
8359
8475
|
OutlineButton,
|
|
@@ -8367,7 +8483,6 @@ export {
|
|
|
8367
8483
|
RingWave,
|
|
8368
8484
|
ScrollPicker,
|
|
8369
8485
|
SearchableList,
|
|
8370
|
-
SearchableSelect,
|
|
8371
8486
|
Select,
|
|
8372
8487
|
SelectUncontrolled,
|
|
8373
8488
|
SessionStorageService,
|
|
@@ -8415,6 +8530,7 @@ export {
|
|
|
8415
8530
|
equalDate,
|
|
8416
8531
|
equalSizeGroups,
|
|
8417
8532
|
filterNews,
|
|
8533
|
+
formTranslation,
|
|
8418
8534
|
formatDate,
|
|
8419
8535
|
formatDateTime,
|
|
8420
8536
|
generateShadingColors,
|
|
@@ -8425,6 +8541,7 @@ export {
|
|
|
8425
8541
|
isDataObjectSelected,
|
|
8426
8542
|
isInTimeSpan,
|
|
8427
8543
|
localizedNewsSchema,
|
|
8544
|
+
monthTranslation,
|
|
8428
8545
|
monthsList,
|
|
8429
8546
|
newsListSchema,
|
|
8430
8547
|
newsSchema,
|
|
@@ -8434,6 +8551,7 @@ export {
|
|
|
8434
8551
|
removeFromTableSelection,
|
|
8435
8552
|
shadingColorValues,
|
|
8436
8553
|
subtractDuration,
|
|
8554
|
+
timeTranslation,
|
|
8437
8555
|
updatePagination,
|
|
8438
8556
|
useHoverState,
|
|
8439
8557
|
useLanguage,
|
|
@@ -8441,6 +8559,7 @@ export {
|
|
|
8441
8559
|
useLocale,
|
|
8442
8560
|
useOutsideClick,
|
|
8443
8561
|
useSaveDelay,
|
|
8562
|
+
useSearch,
|
|
8444
8563
|
useTheme,
|
|
8445
8564
|
useTranslation,
|
|
8446
8565
|
validateEmail,
|