@helpwave/hightide 0.1.8 → 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/date/DatePicker.d.mts +3 -4
- package/dist/components/date/DatePicker.d.ts +3 -4
- package/dist/components/date/DatePicker.js +117 -13
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +117 -13
- package/dist/components/date/DatePicker.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/dialogs/ConfirmDialog.d.mts +2 -5
- package/dist/components/dialogs/ConfirmDialog.d.ts +2 -5
- package/dist/components/dialogs/ConfirmDialog.js +155 -23
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +155 -23
- package/dist/components/dialogs/ConfirmDialog.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 +150 -10
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +150 -10
- 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 +3 -2
- package/dist/components/layout-and-navigation/SearchableList.d.ts +3 -2
- package/dist/components/layout-and-navigation/SearchableList.js +149 -11
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +149 -11
- 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 +145 -15
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +145 -15
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +145 -13
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.mjs +145 -13
- 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/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/modals/ConfirmModal.d.mts +2 -5
- package/dist/components/modals/ConfirmModal.d.ts +2 -5
- package/dist/components/modals/ConfirmModal.js +156 -26
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +156 -26
- 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 +160 -46
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +160 -46
- 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 +156 -26
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +156 -26
- 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 +161 -23
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +161 -23
- 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 +169 -29
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +169 -29
- 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 +147 -25
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +147 -25
- 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 +145 -13
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +145 -13
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +4 -5
- package/dist/components/properties/MultiSelectProperty.d.ts +4 -5
- package/dist/components/properties/MultiSelectProperty.js +160 -42
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +160 -42
- 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 +147 -15
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +147 -15
- 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 +145 -13
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +145 -13
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +2 -3
- package/dist/components/properties/SelectProperty.d.ts +2 -3
- package/dist/components/properties/SelectProperty.js +150 -28
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +150 -28
- 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 +149 -17
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +149 -17
- 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 +215 -51
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +215 -51
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +4 -8
- package/dist/components/user-action/MultiSelect.d.ts +4 -8
- package/dist/components/user-action/MultiSelect.js +156 -22
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +156 -22
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +149 -11
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +149 -11
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/css/globals.css +13 -4
- package/dist/css/uncompiled/globals.css +4 -4
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +332 -300
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +329 -300
- 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/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3148,15 +3148,55 @@ var LanguageProvider = ({ initialLanguage, children }) => {
|
|
|
3148
3148
|
};
|
|
3149
3149
|
|
|
3150
3150
|
// src/localization/useTranslation.ts
|
|
3151
|
-
var useTranslation = (
|
|
3152
|
-
const { language: languageProp, translation: overwrite } =
|
|
3151
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
3152
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
3153
3153
|
const { language: inferredLanguage } = useLanguage();
|
|
3154
3154
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
3155
|
-
|
|
3156
|
-
if (overwrite
|
|
3157
|
-
|
|
3158
|
-
}
|
|
3159
|
-
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
|
+
};
|
|
3160
3200
|
};
|
|
3161
3201
|
|
|
3162
3202
|
// src/util/noop.ts
|
|
@@ -3870,16 +3910,80 @@ var DayPickerUncontrolled = ({
|
|
|
3870
3910
|
);
|
|
3871
3911
|
};
|
|
3872
3912
|
|
|
3873
|
-
// src/
|
|
3874
|
-
|
|
3875
|
-
var defaultDatePickerTranslation = {
|
|
3913
|
+
// src/localization/defaults/time.ts
|
|
3914
|
+
var monthTranslation = {
|
|
3876
3915
|
en: {
|
|
3877
|
-
|
|
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"
|
|
3878
3928
|
},
|
|
3879
3929
|
de: {
|
|
3880
|
-
|
|
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"
|
|
3881
3942
|
}
|
|
3882
3943
|
};
|
|
3944
|
+
var timeTranslation = {
|
|
3945
|
+
en: {
|
|
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"
|
|
3963
|
+
},
|
|
3964
|
+
de: {
|
|
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"
|
|
3982
|
+
}
|
|
3983
|
+
};
|
|
3984
|
+
|
|
3985
|
+
// src/components/date/DatePicker.tsx
|
|
3986
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3883
3987
|
var DatePicker = ({
|
|
3884
3988
|
overwriteTranslation,
|
|
3885
3989
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -3892,7 +3996,7 @@ var DatePicker = ({
|
|
|
3892
3996
|
className = ""
|
|
3893
3997
|
}) => {
|
|
3894
3998
|
const locale = useLocale();
|
|
3895
|
-
const translation = useTranslation(
|
|
3999
|
+
const translation = useTranslation([timeTranslation], overwriteTranslation);
|
|
3896
4000
|
const [displayedMonth, setDisplayedMonth] = useState6(value);
|
|
3897
4001
|
const [displayMode, setDisplayMode] = useState6(initialDisplay);
|
|
3898
4002
|
useEffect6(() => {
|
|
@@ -3975,7 +4079,7 @@ var DatePicker = ({
|
|
|
3975
4079
|
newDate.setHours(value.getHours(), value.getMinutes());
|
|
3976
4080
|
onChange(newDate);
|
|
3977
4081
|
},
|
|
3978
|
-
children: translation
|
|
4082
|
+
children: translation("today")
|
|
3979
4083
|
}
|
|
3980
4084
|
) })
|
|
3981
4085
|
] })
|
|
@@ -4005,42 +4109,14 @@ var DatePickerUncontrolled = ({
|
|
|
4005
4109
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4006
4110
|
var defaultTimeDisplayTranslations = {
|
|
4007
4111
|
en: {
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
inDays: (days) => `in ${days} days`,
|
|
4012
|
-
agoDays: (days) => `${days} days ago`,
|
|
4013
|
-
january: "January",
|
|
4014
|
-
february: "February",
|
|
4015
|
-
march: "March",
|
|
4016
|
-
april: "April",
|
|
4017
|
-
may: "May",
|
|
4018
|
-
june: "June",
|
|
4019
|
-
july: "July",
|
|
4020
|
-
august: "August",
|
|
4021
|
-
september: "September",
|
|
4022
|
-
october: "October",
|
|
4023
|
-
november: "November",
|
|
4024
|
-
december: "December"
|
|
4112
|
+
...timeTranslation.en,
|
|
4113
|
+
inDays: `in {{days}} days`,
|
|
4114
|
+
agoDays: `{{days}} days ago`
|
|
4025
4115
|
},
|
|
4026
4116
|
de: {
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
inDays: (days) => `in ${days} Tagen`,
|
|
4031
|
-
agoDays: (days) => `vor ${days} Tagen`,
|
|
4032
|
-
january: "Januar",
|
|
4033
|
-
february: "Februar",
|
|
4034
|
-
march: "M\xE4rz",
|
|
4035
|
-
april: "April",
|
|
4036
|
-
may: "Mai",
|
|
4037
|
-
june: "Juni",
|
|
4038
|
-
july: "Juli",
|
|
4039
|
-
august: "August",
|
|
4040
|
-
september: "September",
|
|
4041
|
-
october: "October",
|
|
4042
|
-
november: "November",
|
|
4043
|
-
december: "December"
|
|
4117
|
+
...timeTranslation.de,
|
|
4118
|
+
inDays: `in {{days}} Tagen`,
|
|
4119
|
+
agoDays: `vor {{days}} Tagen`
|
|
4044
4120
|
}
|
|
4045
4121
|
};
|
|
4046
4122
|
var TimeDisplay = ({
|
|
@@ -4048,31 +4124,31 @@ var TimeDisplay = ({
|
|
|
4048
4124
|
date,
|
|
4049
4125
|
mode = "daysFromToday"
|
|
4050
4126
|
}) => {
|
|
4051
|
-
const translation = useTranslation(defaultTimeDisplayTranslations, overwriteTranslation);
|
|
4127
|
+
const translation = useTranslation([defaultTimeDisplayTranslations], overwriteTranslation);
|
|
4052
4128
|
const difference = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0).valueOf() - new Date(date).setHours(0, 0, 0, 0).valueOf();
|
|
4053
4129
|
const isBefore = difference > 0;
|
|
4054
4130
|
const differenceInDays = Math.floor(Math.abs(difference) / (1e3 * 3600 * 24));
|
|
4055
4131
|
let displayString;
|
|
4056
4132
|
if (differenceInDays === 0) {
|
|
4057
|
-
displayString = translation
|
|
4133
|
+
displayString = translation("today");
|
|
4058
4134
|
} else if (differenceInDays === 1) {
|
|
4059
|
-
displayString = isBefore ? translation
|
|
4135
|
+
displayString = isBefore ? translation("yesterday") : translation("tomorrow");
|
|
4060
4136
|
} else {
|
|
4061
|
-
displayString = isBefore ? translation.
|
|
4137
|
+
displayString = isBefore ? translation("agoDays", { replacements: { days: differenceInDays.toString() } }) : translation("inDays", { replacements: { days: differenceInDays.toString() } });
|
|
4062
4138
|
}
|
|
4063
4139
|
const monthToTranslation = {
|
|
4064
|
-
0: translation
|
|
4065
|
-
1: translation
|
|
4066
|
-
2: translation
|
|
4067
|
-
3: translation
|
|
4068
|
-
4: translation
|
|
4069
|
-
5: translation
|
|
4070
|
-
6: translation
|
|
4071
|
-
7: translation
|
|
4072
|
-
8: translation
|
|
4073
|
-
9: translation
|
|
4074
|
-
10: translation
|
|
4075
|
-
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")
|
|
4076
4152
|
};
|
|
4077
4153
|
let fullString;
|
|
4078
4154
|
if (mode === "daysFromToday") {
|
|
@@ -4342,6 +4418,108 @@ var Tooltip = ({
|
|
|
4342
4418
|
|
|
4343
4419
|
// src/components/layout-and-navigation/Overlay.tsx
|
|
4344
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
|
|
4345
4523
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4346
4524
|
var Overlay = ({
|
|
4347
4525
|
children,
|
|
@@ -4371,10 +4549,10 @@ var Overlay = ({
|
|
|
4371
4549
|
var overlayStack = [];
|
|
4372
4550
|
var defaultModalHeaderTranslation = {
|
|
4373
4551
|
en: {
|
|
4374
|
-
|
|
4552
|
+
...formTranslation.en
|
|
4375
4553
|
},
|
|
4376
4554
|
de: {
|
|
4377
|
-
|
|
4555
|
+
...formTranslation.de
|
|
4378
4556
|
}
|
|
4379
4557
|
};
|
|
4380
4558
|
var OverlayHeader = ({
|
|
@@ -4385,7 +4563,7 @@ var OverlayHeader = ({
|
|
|
4385
4563
|
description,
|
|
4386
4564
|
descriptionText = ""
|
|
4387
4565
|
}) => {
|
|
4388
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
4566
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
4389
4567
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
4390
4568
|
const titleRow = /* @__PURE__ */ jsxs9("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
4391
4569
|
title ?? /* @__PURE__ */ jsx13(
|
|
@@ -4397,7 +4575,7 @@ var OverlayHeader = ({
|
|
|
4397
4575
|
children: titleText
|
|
4398
4576
|
}
|
|
4399
4577
|
),
|
|
4400
|
-
!!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" }) }) })
|
|
4401
4579
|
] });
|
|
4402
4580
|
return /* @__PURE__ */ jsxs9("div", { className: "col", children: [
|
|
4403
4581
|
hasTitleRow && titleRow,
|
|
@@ -4548,16 +4726,6 @@ var Dialog = ({
|
|
|
4548
4726
|
|
|
4549
4727
|
// src/components/dialogs/ConfirmDialog.tsx
|
|
4550
4728
|
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4551
|
-
var defaultConfirmDialogTranslation = {
|
|
4552
|
-
en: {
|
|
4553
|
-
confirm: "Confirm",
|
|
4554
|
-
decline: "Decline"
|
|
4555
|
-
},
|
|
4556
|
-
de: {
|
|
4557
|
-
confirm: "Best\xE4tigen",
|
|
4558
|
-
decline: "Ablehnen"
|
|
4559
|
-
}
|
|
4560
|
-
};
|
|
4561
4729
|
var ConfirmDialog = ({
|
|
4562
4730
|
overwriteTranslation,
|
|
4563
4731
|
children,
|
|
@@ -4568,7 +4736,7 @@ var ConfirmDialog = ({
|
|
|
4568
4736
|
className,
|
|
4569
4737
|
...restProps
|
|
4570
4738
|
}) => {
|
|
4571
|
-
const translation = useTranslation(
|
|
4739
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
4572
4740
|
const mapping = {
|
|
4573
4741
|
neutral: "primary",
|
|
4574
4742
|
negative: "negative",
|
|
@@ -4584,7 +4752,7 @@ var ConfirmDialog = ({
|
|
|
4584
4752
|
color: buttonOverwrites?.[0].color ?? "negative",
|
|
4585
4753
|
onClick: onDecline,
|
|
4586
4754
|
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
4587
|
-
children: buttonOverwrites?.[0].text ?? translation
|
|
4755
|
+
children: buttonOverwrites?.[0].text ?? translation("decline")
|
|
4588
4756
|
}
|
|
4589
4757
|
),
|
|
4590
4758
|
/* @__PURE__ */ jsx14(
|
|
@@ -4594,7 +4762,7 @@ var ConfirmDialog = ({
|
|
|
4594
4762
|
color: buttonOverwrites?.[1].color ?? mapping[confirmType],
|
|
4595
4763
|
onClick: onConfirm,
|
|
4596
4764
|
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
4597
|
-
children: buttonOverwrites?.[1].text ?? translation
|
|
4765
|
+
children: buttonOverwrites?.[1].text ?? translation("confirm")
|
|
4598
4766
|
}
|
|
4599
4767
|
)
|
|
4600
4768
|
] })
|
|
@@ -5770,21 +5938,13 @@ var FAQSection = ({
|
|
|
5770
5938
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
5771
5939
|
import clsx21 from "clsx";
|
|
5772
5940
|
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5773
|
-
var defaultPaginationTranslations = {
|
|
5774
|
-
en: {
|
|
5775
|
-
of: "of"
|
|
5776
|
-
},
|
|
5777
|
-
de: {
|
|
5778
|
-
of: "von"
|
|
5779
|
-
}
|
|
5780
|
-
};
|
|
5781
5941
|
var Pagination = ({
|
|
5782
5942
|
overwriteTranslation,
|
|
5783
5943
|
page,
|
|
5784
5944
|
numberOfPages,
|
|
5785
5945
|
onPageChanged
|
|
5786
5946
|
}) => {
|
|
5787
|
-
const translation = useTranslation(
|
|
5947
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
5788
5948
|
const changePage = (page2) => {
|
|
5789
5949
|
onPageChanged(page2);
|
|
5790
5950
|
};
|
|
@@ -5796,7 +5956,7 @@ var Pagination = ({
|
|
|
5796
5956
|
/* @__PURE__ */ jsx25("button", { onClick: () => changePage(page - 1), disabled: onFirstPage, children: /* @__PURE__ */ jsx25(ChevronLeft2, { className: clsx21({ "opacity-30": onFirstPage }) }) }),
|
|
5797
5957
|
/* @__PURE__ */ jsxs16("div", { className: "min-w-[80px] justify-center mx-2", children: [
|
|
5798
5958
|
/* @__PURE__ */ jsx25("span", { className: "select-none text-right flex-1", children: noPages ? 0 : page + 1 }),
|
|
5799
|
-
/* @__PURE__ */ jsx25("span", { className: "select-none mx-2", children: translation
|
|
5959
|
+
/* @__PURE__ */ jsx25("span", { className: "select-none mx-2", children: translation("of") }),
|
|
5800
5960
|
/* @__PURE__ */ jsx25("span", { className: "select-none text-left flex-1", children: numberOfPages })
|
|
5801
5961
|
] }),
|
|
5802
5962
|
/* @__PURE__ */ jsx25("button", { onClick: () => changePage(page + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx25(ChevronRight2, { className: clsx21({ "opacity-30": onLastPage }) }) }),
|
|
@@ -6041,11 +6201,9 @@ var useSearch = ({
|
|
|
6041
6201
|
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6042
6202
|
var defaultSearchableListTranslation = {
|
|
6043
6203
|
en: {
|
|
6044
|
-
search: "Search",
|
|
6045
6204
|
nothingFound: "Nothing found"
|
|
6046
6205
|
},
|
|
6047
6206
|
de: {
|
|
6048
|
-
search: "Suche",
|
|
6049
6207
|
nothingFound: "Nichts gefunden"
|
|
6050
6208
|
}
|
|
6051
6209
|
};
|
|
@@ -6060,7 +6218,7 @@ var SearchableList = ({
|
|
|
6060
6218
|
className,
|
|
6061
6219
|
resultListClassName
|
|
6062
6220
|
}) => {
|
|
6063
|
-
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
6221
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
6064
6222
|
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
6065
6223
|
return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
|
|
6066
6224
|
list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
@@ -6069,14 +6227,14 @@ var SearchableList = ({
|
|
|
6069
6227
|
{
|
|
6070
6228
|
value: search,
|
|
6071
6229
|
onChangeText: setSearch,
|
|
6072
|
-
placeholder: translation
|
|
6230
|
+
placeholder: translation("search"),
|
|
6073
6231
|
autoFocus,
|
|
6074
6232
|
className: "w-full"
|
|
6075
6233
|
}
|
|
6076
6234
|
),
|
|
6077
6235
|
/* @__PURE__ */ jsx28(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx28(Search, { className: "w-full h-full" }) })
|
|
6078
6236
|
] }),
|
|
6079
|
-
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
|
|
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") })
|
|
6080
6238
|
] });
|
|
6081
6239
|
};
|
|
6082
6240
|
|
|
@@ -6085,18 +6243,6 @@ import { Check as Check2, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRi
|
|
|
6085
6243
|
import clsx25 from "clsx";
|
|
6086
6244
|
import { useEffect as useEffect15, useState as useState15 } from "react";
|
|
6087
6245
|
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6088
|
-
var defaultStepperBarTranslation = {
|
|
6089
|
-
en: {
|
|
6090
|
-
back: "Back",
|
|
6091
|
-
next: "Next",
|
|
6092
|
-
confirm: "Create"
|
|
6093
|
-
},
|
|
6094
|
-
de: {
|
|
6095
|
-
back: "Zur\xFCck",
|
|
6096
|
-
next: "N\xE4chster",
|
|
6097
|
-
confirm: "Fertig"
|
|
6098
|
-
}
|
|
6099
|
-
};
|
|
6100
6246
|
var defaultState = {
|
|
6101
6247
|
currentStep: 0,
|
|
6102
6248
|
seenSteps: /* @__PURE__ */ new Set([0])
|
|
@@ -6112,7 +6258,7 @@ var StepperBar = ({
|
|
|
6112
6258
|
showDots = true,
|
|
6113
6259
|
className = ""
|
|
6114
6260
|
}) => {
|
|
6115
|
-
const translation = useTranslation(
|
|
6261
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6116
6262
|
const dots = range(0, numberOfSteps);
|
|
6117
6263
|
const { currentStep, seenSteps } = state ?? defaultState;
|
|
6118
6264
|
const update = (newStep) => {
|
|
@@ -6134,7 +6280,7 @@ var StepperBar = ({
|
|
|
6134
6280
|
className: "row gap-x-1 items-center justify-center",
|
|
6135
6281
|
children: [
|
|
6136
6282
|
/* @__PURE__ */ jsx29(ChevronLeft3, { size: 14 }),
|
|
6137
|
-
translation
|
|
6283
|
+
translation("back")
|
|
6138
6284
|
]
|
|
6139
6285
|
}
|
|
6140
6286
|
) }),
|
|
@@ -6167,7 +6313,7 @@ var StepperBar = ({
|
|
|
6167
6313
|
className: "row gap-x-1 items-center justify-center",
|
|
6168
6314
|
disabled: disabledSteps.has(currentStep),
|
|
6169
6315
|
children: [
|
|
6170
|
-
translation
|
|
6316
|
+
translation("next"),
|
|
6171
6317
|
/* @__PURE__ */ jsx29(ChevronRight3, { size: 14 })
|
|
6172
6318
|
]
|
|
6173
6319
|
}
|
|
@@ -6180,7 +6326,7 @@ var StepperBar = ({
|
|
|
6180
6326
|
className: "row gap-x-1 items-center justify-center",
|
|
6181
6327
|
children: [
|
|
6182
6328
|
/* @__PURE__ */ jsx29(Check2, { size: 14 }),
|
|
6183
|
-
finishText ?? translation
|
|
6329
|
+
finishText ?? translation("confirm")
|
|
6184
6330
|
]
|
|
6185
6331
|
}
|
|
6186
6332
|
) })
|
|
@@ -6544,14 +6690,6 @@ var SortButton = ({
|
|
|
6544
6690
|
// src/components/layout-and-navigation/TextImage.tsx
|
|
6545
6691
|
import clsx28 from "clsx";
|
|
6546
6692
|
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6547
|
-
var defaultTextImageTranslation = {
|
|
6548
|
-
de: {
|
|
6549
|
-
showMore: "Mehr anzeigen"
|
|
6550
|
-
},
|
|
6551
|
-
en: {
|
|
6552
|
-
showMore: "Show more"
|
|
6553
|
-
}
|
|
6554
|
-
};
|
|
6555
6693
|
var TextImage = ({
|
|
6556
6694
|
overwriteTranslation,
|
|
6557
6695
|
title,
|
|
@@ -6563,11 +6701,11 @@ var TextImage = ({
|
|
|
6563
6701
|
contentClassName = "",
|
|
6564
6702
|
className = ""
|
|
6565
6703
|
}) => {
|
|
6566
|
-
const translation = useTranslation(
|
|
6704
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6567
6705
|
const chipColorMapping = {
|
|
6568
|
-
primary: "text-text-image-primary-background bg-text-
|
|
6569
|
-
secondary: "text-text-image-secondary-background bg-text-
|
|
6570
|
-
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"
|
|
6571
6709
|
};
|
|
6572
6710
|
const colorMapping = {
|
|
6573
6711
|
primary: "text-text-image-primary-text bg-linear-to-r from-30% from-text-image-primary-background to-text-image-primary-background/55",
|
|
@@ -6587,12 +6725,12 @@ var TextImage = ({
|
|
|
6587
6725
|
{
|
|
6588
6726
|
className: clsx28(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
|
|
6589
6727
|
children: [
|
|
6590
|
-
badge && /* @__PURE__ */ jsx32("div", { className: clsx28(`chip-full
|
|
6591
|
-
/* @__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: [
|
|
6592
6730
|
/* @__PURE__ */ jsx32("span", { className: "textstyle-title-xl", children: title }),
|
|
6593
6731
|
/* @__PURE__ */ jsx32("span", { className: "text-ellipsis overflow-hidden", children: description })
|
|
6594
6732
|
] }),
|
|
6595
|
-
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") }) })
|
|
6596
6734
|
]
|
|
6597
6735
|
}
|
|
6598
6736
|
)
|
|
@@ -6670,10 +6808,10 @@ var ErrorComponent = ({
|
|
|
6670
6808
|
errorText,
|
|
6671
6809
|
classname
|
|
6672
6810
|
}) => {
|
|
6673
|
-
const translation = useTranslation(defaultErrorComponentTranslation, overwriteTranslation);
|
|
6811
|
+
const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
|
|
6674
6812
|
return /* @__PURE__ */ jsxs24("div", { className: clsx29("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
|
|
6675
6813
|
/* @__PURE__ */ jsx34(AlertOctagon, { size: 64, className: "text-warning" }),
|
|
6676
|
-
errorText ?? `${translation
|
|
6814
|
+
errorText ?? `${translation("errorOccurred")} :(`
|
|
6677
6815
|
] });
|
|
6678
6816
|
};
|
|
6679
6817
|
|
|
@@ -6683,23 +6821,15 @@ import { useState as useState18 } from "react";
|
|
|
6683
6821
|
// src/components/loading-states/LoadingAnimation.tsx
|
|
6684
6822
|
import clsx30 from "clsx";
|
|
6685
6823
|
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6686
|
-
var defaultLoadingAnimationTranslation = {
|
|
6687
|
-
en: {
|
|
6688
|
-
loading: "Loading data"
|
|
6689
|
-
},
|
|
6690
|
-
de: {
|
|
6691
|
-
loading: "Lade Daten"
|
|
6692
|
-
}
|
|
6693
|
-
};
|
|
6694
6824
|
var LoadingAnimation = ({
|
|
6695
6825
|
overwriteTranslation,
|
|
6696
6826
|
loadingText,
|
|
6697
6827
|
classname
|
|
6698
6828
|
}) => {
|
|
6699
|
-
const translation = useTranslation(
|
|
6829
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6700
6830
|
return /* @__PURE__ */ jsxs25("div", { className: clsx30("col items-center justify-center w-full h-24", classname), children: [
|
|
6701
6831
|
/* @__PURE__ */ jsx35(Helpwave, { animate: "loading" }),
|
|
6702
|
-
loadingText ?? `${translation
|
|
6832
|
+
loadingText ?? `${translation("loading")}...`
|
|
6703
6833
|
] });
|
|
6704
6834
|
};
|
|
6705
6835
|
|
|
@@ -6801,18 +6931,6 @@ var ProgressIndicator = ({
|
|
|
6801
6931
|
// src/components/modals/ConfirmModal.tsx
|
|
6802
6932
|
import clsx32 from "clsx";
|
|
6803
6933
|
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6804
|
-
var defaultConfirmDialogTranslation2 = {
|
|
6805
|
-
en: {
|
|
6806
|
-
confirm: "Confirm",
|
|
6807
|
-
cancel: "Cancel",
|
|
6808
|
-
decline: "Decline"
|
|
6809
|
-
},
|
|
6810
|
-
de: {
|
|
6811
|
-
confirm: "Best\xE4tigen",
|
|
6812
|
-
cancel: "Abbrechen",
|
|
6813
|
-
decline: "Ablehnen"
|
|
6814
|
-
}
|
|
6815
|
-
};
|
|
6816
6934
|
var ConfirmModal = ({
|
|
6817
6935
|
overwriteTranslation,
|
|
6818
6936
|
children,
|
|
@@ -6824,7 +6942,7 @@ var ConfirmModal = ({
|
|
|
6824
6942
|
className,
|
|
6825
6943
|
...restProps
|
|
6826
6944
|
}) => {
|
|
6827
|
-
const translation = useTranslation(
|
|
6945
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6828
6946
|
const mapping = {
|
|
6829
6947
|
neutral: "neutral",
|
|
6830
6948
|
negative: "negative",
|
|
@@ -6840,7 +6958,7 @@ var ConfirmModal = ({
|
|
|
6840
6958
|
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
6841
6959
|
onClick: onCancel,
|
|
6842
6960
|
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
6843
|
-
children: buttonOverwrites?.[0].text ?? translation
|
|
6961
|
+
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
6844
6962
|
}
|
|
6845
6963
|
),
|
|
6846
6964
|
onDecline && /* @__PURE__ */ jsx39(
|
|
@@ -6849,7 +6967,7 @@ var ConfirmModal = ({
|
|
|
6849
6967
|
color: buttonOverwrites?.[1].color ?? "negative",
|
|
6850
6968
|
onClick: onDecline,
|
|
6851
6969
|
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
6852
|
-
children: buttonOverwrites?.[1].text ?? translation
|
|
6970
|
+
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
6853
6971
|
}
|
|
6854
6972
|
),
|
|
6855
6973
|
/* @__PURE__ */ jsx39(
|
|
@@ -6859,7 +6977,7 @@ var ConfirmModal = ({
|
|
|
6859
6977
|
color: buttonOverwrites?.[2].color ?? mapping[confirmType],
|
|
6860
6978
|
onClick: onConfirm,
|
|
6861
6979
|
disabled: buttonOverwrites?.[2].disabled ?? false,
|
|
6862
|
-
children: buttonOverwrites?.[2].text ?? translation
|
|
6980
|
+
children: buttonOverwrites?.[2].text ?? translation("confirm")
|
|
6863
6981
|
}
|
|
6864
6982
|
)
|
|
6865
6983
|
] })
|
|
@@ -6868,22 +6986,6 @@ var ConfirmModal = ({
|
|
|
6868
6986
|
|
|
6869
6987
|
// src/components/modals/DiscardChangesModal.tsx
|
|
6870
6988
|
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
6871
|
-
var defaultDiscardChangesModalTranslation = {
|
|
6872
|
-
en: {
|
|
6873
|
-
save: "Save",
|
|
6874
|
-
cancel: "Cancel",
|
|
6875
|
-
dontSave: "Don't save",
|
|
6876
|
-
title: "Unsaved Changes",
|
|
6877
|
-
description: "Do you want to save your changes?"
|
|
6878
|
-
},
|
|
6879
|
-
de: {
|
|
6880
|
-
save: "Speichern",
|
|
6881
|
-
cancel: "Abbrechen",
|
|
6882
|
-
dontSave: "Nicht Speichern",
|
|
6883
|
-
title: "Ungespeicherte \xC4nderungen",
|
|
6884
|
-
description: "M\xF6chtest du die \xC4nderungen speichern?"
|
|
6885
|
-
}
|
|
6886
|
-
};
|
|
6887
6989
|
var DiscardChangesModal = ({
|
|
6888
6990
|
overwriteTranslation,
|
|
6889
6991
|
children,
|
|
@@ -6893,19 +6995,19 @@ var DiscardChangesModal = ({
|
|
|
6893
6995
|
headerProps,
|
|
6894
6996
|
...modalProps
|
|
6895
6997
|
}) => {
|
|
6896
|
-
const translation = useTranslation(
|
|
6998
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6897
6999
|
return /* @__PURE__ */ jsx40(
|
|
6898
7000
|
ConfirmModal,
|
|
6899
7001
|
{
|
|
6900
7002
|
headerProps: {
|
|
6901
7003
|
...headerProps,
|
|
6902
|
-
titleText: headerProps?.titleText ?? translation
|
|
6903
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7004
|
+
titleText: headerProps?.titleText ?? translation("unsavedChanges"),
|
|
7005
|
+
descriptionText: headerProps?.descriptionText ?? translation("unsavedChangesSaveQuestion")
|
|
6904
7006
|
},
|
|
6905
7007
|
onConfirm: onSave,
|
|
6906
7008
|
onCancel,
|
|
6907
7009
|
onDecline: onDontSave,
|
|
6908
|
-
buttonOverwrites: [{ text: translation
|
|
7010
|
+
buttonOverwrites: [{ text: translation("cancel") }, { text: translation("discardChanges") }, { text: translation("save") }],
|
|
6909
7011
|
...modalProps,
|
|
6910
7012
|
children
|
|
6911
7013
|
}
|
|
@@ -7065,14 +7167,14 @@ var SelectUncontrolled = ({
|
|
|
7065
7167
|
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7066
7168
|
var defaultLanguageModalTranslation = {
|
|
7067
7169
|
en: {
|
|
7068
|
-
|
|
7069
|
-
|
|
7170
|
+
language: "Language",
|
|
7171
|
+
chooseLanguage: "Choose your language",
|
|
7070
7172
|
done: "Done",
|
|
7071
7173
|
...LanguageUtil.languagesLocalNames
|
|
7072
7174
|
},
|
|
7073
7175
|
de: {
|
|
7074
|
-
|
|
7075
|
-
|
|
7176
|
+
language: "Sprache",
|
|
7177
|
+
chooseLanguage: "W\xE4hle deine bevorzugte Sprache",
|
|
7076
7178
|
done: "Fertig",
|
|
7077
7179
|
...LanguageUtil.languagesLocalNames
|
|
7078
7180
|
}
|
|
@@ -7084,14 +7186,14 @@ var LanguageModal = ({
|
|
|
7084
7186
|
...modalProps
|
|
7085
7187
|
}) => {
|
|
7086
7188
|
const { language, setLanguage } = useLanguage();
|
|
7087
|
-
const translation = useTranslation(defaultLanguageModalTranslation, overwriteTranslation);
|
|
7189
|
+
const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
|
|
7088
7190
|
return /* @__PURE__ */ jsx43(
|
|
7089
7191
|
Modal,
|
|
7090
7192
|
{
|
|
7091
7193
|
headerProps: {
|
|
7092
7194
|
...headerProps,
|
|
7093
|
-
titleText: headerProps?.titleText ?? translation
|
|
7094
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7195
|
+
titleText: headerProps?.titleText ?? translation("language"),
|
|
7196
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseLanguage")
|
|
7095
7197
|
},
|
|
7096
7198
|
onClose,
|
|
7097
7199
|
...modalProps,
|
|
@@ -7105,7 +7207,7 @@ var LanguageModal = ({
|
|
|
7105
7207
|
onChange: (language2) => setLanguage(language2)
|
|
7106
7208
|
}
|
|
7107
7209
|
),
|
|
7108
|
-
/* @__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") }) })
|
|
7109
7211
|
] })
|
|
7110
7212
|
}
|
|
7111
7213
|
);
|
|
@@ -7118,11 +7220,19 @@ var themes = ["light", "dark"];
|
|
|
7118
7220
|
var defaultThemeTypeTranslation = {
|
|
7119
7221
|
en: {
|
|
7120
7222
|
dark: "Dark",
|
|
7121
|
-
light: "Light"
|
|
7223
|
+
light: "Light",
|
|
7224
|
+
theme: {
|
|
7225
|
+
one: "Theme",
|
|
7226
|
+
other: "Themes"
|
|
7227
|
+
}
|
|
7122
7228
|
},
|
|
7123
7229
|
de: {
|
|
7124
7230
|
dark: "Dunkel",
|
|
7125
|
-
light: "Hell"
|
|
7231
|
+
light: "Hell",
|
|
7232
|
+
theme: {
|
|
7233
|
+
one: "Farbschema",
|
|
7234
|
+
other: "Farbschemas"
|
|
7235
|
+
}
|
|
7126
7236
|
}
|
|
7127
7237
|
};
|
|
7128
7238
|
var ThemeUtil = {
|
|
@@ -7150,18 +7260,12 @@ var useTheme = () => useContext2(ThemeContext);
|
|
|
7150
7260
|
|
|
7151
7261
|
// src/components/modals/ThemeModal.tsx
|
|
7152
7262
|
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7153
|
-
var
|
|
7263
|
+
var defaultConfirmDialogTranslation = {
|
|
7154
7264
|
en: {
|
|
7155
|
-
|
|
7156
|
-
message: "Choose your preferred theme",
|
|
7157
|
-
done: "Done",
|
|
7158
|
-
...ThemeUtil.translation.en
|
|
7265
|
+
chooseTheme: "Choose your preferred theme"
|
|
7159
7266
|
},
|
|
7160
7267
|
de: {
|
|
7161
|
-
|
|
7162
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
7163
|
-
done: "Fertig",
|
|
7164
|
-
...ThemeUtil.translation.en
|
|
7268
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
7165
7269
|
}
|
|
7166
7270
|
};
|
|
7167
7271
|
var ThemeModal = ({
|
|
@@ -7171,14 +7275,14 @@ var ThemeModal = ({
|
|
|
7171
7275
|
...modalProps
|
|
7172
7276
|
}) => {
|
|
7173
7277
|
const { theme, setTheme } = useTheme();
|
|
7174
|
-
const translation = useTranslation(
|
|
7278
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
7175
7279
|
return /* @__PURE__ */ jsx45(
|
|
7176
7280
|
Modal,
|
|
7177
7281
|
{
|
|
7178
7282
|
headerProps: {
|
|
7179
7283
|
...headerProps,
|
|
7180
|
-
titleText: headerProps?.titleText ?? translation
|
|
7181
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7284
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
7285
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
7182
7286
|
},
|
|
7183
7287
|
onClose,
|
|
7184
7288
|
...modalProps,
|
|
@@ -7192,7 +7296,7 @@ var ThemeModal = ({
|
|
|
7192
7296
|
onChange: (theme2) => setTheme(theme2)
|
|
7193
7297
|
}
|
|
7194
7298
|
),
|
|
7195
|
-
/* @__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") }) })
|
|
7196
7300
|
] })
|
|
7197
7301
|
}
|
|
7198
7302
|
);
|
|
@@ -7205,14 +7309,6 @@ import { Check as Check4 } from "lucide-react";
|
|
|
7205
7309
|
import { AlertTriangle } from "lucide-react";
|
|
7206
7310
|
import clsx34 from "clsx";
|
|
7207
7311
|
import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7208
|
-
var defaultPropertyBaseTranslation = {
|
|
7209
|
-
en: {
|
|
7210
|
-
remove: "Remove"
|
|
7211
|
-
},
|
|
7212
|
-
de: {
|
|
7213
|
-
remove: "Entfernen"
|
|
7214
|
-
}
|
|
7215
|
-
};
|
|
7216
7312
|
var PropertyBase = ({
|
|
7217
7313
|
overwriteTranslation,
|
|
7218
7314
|
name,
|
|
@@ -7224,7 +7320,7 @@ var PropertyBase = ({
|
|
|
7224
7320
|
onRemove,
|
|
7225
7321
|
className = ""
|
|
7226
7322
|
}) => {
|
|
7227
|
-
const translation = useTranslation(
|
|
7323
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7228
7324
|
const requiredAndNoValue = softRequired && !hasValue;
|
|
7229
7325
|
return /* @__PURE__ */ jsxs32("div", { className: clsx34("row gap-x-0 group", className), children: [
|
|
7230
7326
|
/* @__PURE__ */ jsxs32(
|
|
@@ -7257,7 +7353,7 @@ var PropertyBase = ({
|
|
|
7257
7353
|
color: "negative",
|
|
7258
7354
|
className: clsx34("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
|
|
7259
7355
|
disabled: !hasValue || readOnly,
|
|
7260
|
-
children: translation
|
|
7356
|
+
children: translation("remove")
|
|
7261
7357
|
}
|
|
7262
7358
|
)
|
|
7263
7359
|
]
|
|
@@ -7268,16 +7364,6 @@ var PropertyBase = ({
|
|
|
7268
7364
|
|
|
7269
7365
|
// src/components/properties/CheckboxProperty.tsx
|
|
7270
7366
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
7271
|
-
var defaultCheckboxPropertyTranslation = {
|
|
7272
|
-
en: {
|
|
7273
|
-
yes: "Yes",
|
|
7274
|
-
no: "No"
|
|
7275
|
-
},
|
|
7276
|
-
de: {
|
|
7277
|
-
yes: "Ja",
|
|
7278
|
-
no: "Nein"
|
|
7279
|
-
}
|
|
7280
|
-
};
|
|
7281
7367
|
var CheckboxProperty = ({
|
|
7282
7368
|
overwriteTranslation,
|
|
7283
7369
|
value,
|
|
@@ -7285,7 +7371,7 @@ var CheckboxProperty = ({
|
|
|
7285
7371
|
readOnly,
|
|
7286
7372
|
...baseProps
|
|
7287
7373
|
}) => {
|
|
7288
|
-
const translation = useTranslation(
|
|
7374
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7289
7375
|
return /* @__PURE__ */ jsx47(
|
|
7290
7376
|
PropertyBase,
|
|
7291
7377
|
{
|
|
@@ -7299,7 +7385,7 @@ var CheckboxProperty = ({
|
|
|
7299
7385
|
checked: value ?? true,
|
|
7300
7386
|
disabled: readOnly,
|
|
7301
7387
|
onChange,
|
|
7302
|
-
label: { name: `${translation
|
|
7388
|
+
label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" }
|
|
7303
7389
|
}
|
|
7304
7390
|
) })
|
|
7305
7391
|
}
|
|
@@ -7366,14 +7452,10 @@ import clsx36 from "clsx";
|
|
|
7366
7452
|
import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7367
7453
|
var defaultMultiSelectTranslation = {
|
|
7368
7454
|
en: {
|
|
7369
|
-
|
|
7370
|
-
search: "Search",
|
|
7371
|
-
selected: "selected"
|
|
7455
|
+
selected: `{{amount}} selected`
|
|
7372
7456
|
},
|
|
7373
7457
|
de: {
|
|
7374
|
-
|
|
7375
|
-
search: "Suche",
|
|
7376
|
-
selected: "ausgew\xE4hlt"
|
|
7458
|
+
selected: `{{amount}} ausgew\xE4hlt`
|
|
7377
7459
|
}
|
|
7378
7460
|
};
|
|
7379
7461
|
var MultiSelect = ({
|
|
@@ -7388,7 +7470,7 @@ var MultiSelect = ({
|
|
|
7388
7470
|
useChipDisplay = false,
|
|
7389
7471
|
className = ""
|
|
7390
7472
|
}) => {
|
|
7391
|
-
const translation = useTranslation(defaultMultiSelectTranslation, overwriteTranslation);
|
|
7473
|
+
const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
|
|
7392
7474
|
const triggerRef = useRef8(null);
|
|
7393
7475
|
const menuRef = useRef8(null);
|
|
7394
7476
|
const [isOpen, setIsOpen] = useState21(false);
|
|
@@ -7421,8 +7503,8 @@ var MultiSelect = ({
|
|
|
7421
7503
|
onClick: () => setIsOpen(!isOpen),
|
|
7422
7504
|
disabled: isDisabled,
|
|
7423
7505
|
children: [
|
|
7424
|
-
!isShowingHint && /* @__PURE__ */ jsx49("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? (useChipDisplay && selectedItems ? /* @__PURE__ */ jsx49(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) :
|
|
7425
|
-
isShowingHint && /* @__PURE__ */ jsx49("span", { className: "textstyle-description", children: hintText ?? translation
|
|
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") }),
|
|
7426
7508
|
isOpen ? /* @__PURE__ */ jsx49(ChevronUp5, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ jsx49(ChevronDown6, { className: "min-w-6" })
|
|
7427
7509
|
]
|
|
7428
7510
|
}
|
|
@@ -7472,7 +7554,7 @@ var MultiSelect = ({
|
|
|
7472
7554
|
})));
|
|
7473
7555
|
},
|
|
7474
7556
|
disabled: options.every((value) => value.selected || value.disabled),
|
|
7475
|
-
children: "
|
|
7557
|
+
children: translation("all")
|
|
7476
7558
|
}
|
|
7477
7559
|
),
|
|
7478
7560
|
/* @__PURE__ */ jsx49(
|
|
@@ -7486,7 +7568,7 @@ var MultiSelect = ({
|
|
|
7486
7568
|
selected: false
|
|
7487
7569
|
})));
|
|
7488
7570
|
},
|
|
7489
|
-
children: "
|
|
7571
|
+
children: translation("none")
|
|
7490
7572
|
}
|
|
7491
7573
|
)
|
|
7492
7574
|
] }),
|
|
@@ -7522,14 +7604,6 @@ var MultiSelectUncontrolled = ({
|
|
|
7522
7604
|
|
|
7523
7605
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7524
7606
|
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
7525
|
-
var defaultMultiSelectPropertyTranslation = {
|
|
7526
|
-
en: {
|
|
7527
|
-
select: "Select"
|
|
7528
|
-
},
|
|
7529
|
-
de: {
|
|
7530
|
-
select: "Ausw\xE4hlen"
|
|
7531
|
-
}
|
|
7532
|
-
};
|
|
7533
7607
|
var MultiSelectProperty = ({
|
|
7534
7608
|
overwriteTranslation,
|
|
7535
7609
|
options,
|
|
@@ -7539,7 +7613,7 @@ var MultiSelectProperty = ({
|
|
|
7539
7613
|
onRemove,
|
|
7540
7614
|
...multiSelectProps
|
|
7541
7615
|
}) => {
|
|
7542
|
-
const translation = useTranslation(
|
|
7616
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7543
7617
|
const hasValue = options.some((value) => value.selected);
|
|
7544
7618
|
return /* @__PURE__ */ jsx50(
|
|
7545
7619
|
PropertyBase,
|
|
@@ -7562,7 +7636,7 @@ var MultiSelectProperty = ({
|
|
|
7562
7636
|
options,
|
|
7563
7637
|
isDisabled: readOnly,
|
|
7564
7638
|
useChipDisplay: true,
|
|
7565
|
-
hintText: `${translation
|
|
7639
|
+
hintText: `${translation("select")}...`
|
|
7566
7640
|
}
|
|
7567
7641
|
)
|
|
7568
7642
|
}
|
|
@@ -7593,7 +7667,7 @@ var NumberProperty = ({
|
|
|
7593
7667
|
suffix,
|
|
7594
7668
|
...baseProps
|
|
7595
7669
|
}) => {
|
|
7596
|
-
const translation = useTranslation(defaultNumberPropertyTranslation, overwriteTranslation);
|
|
7670
|
+
const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
|
|
7597
7671
|
const hasValue = value !== void 0;
|
|
7598
7672
|
return /* @__PURE__ */ jsx51(
|
|
7599
7673
|
PropertyBase,
|
|
@@ -7615,7 +7689,7 @@ var NumberProperty = ({
|
|
|
7615
7689
|
value: value?.toString() ?? "",
|
|
7616
7690
|
type: "number",
|
|
7617
7691
|
readOnly,
|
|
7618
|
-
placeholder: `${translation
|
|
7692
|
+
placeholder: `${translation("value")}...`,
|
|
7619
7693
|
onChangeText: (value2) => {
|
|
7620
7694
|
const numberValue = parseFloat(value2);
|
|
7621
7695
|
if (isNaN(numberValue)) {
|
|
@@ -7646,14 +7720,6 @@ var NumberProperty = ({
|
|
|
7646
7720
|
import { List as List2 } from "lucide-react";
|
|
7647
7721
|
import clsx39 from "clsx";
|
|
7648
7722
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
7649
|
-
var defaultSingleSelectPropertyTranslation = {
|
|
7650
|
-
en: {
|
|
7651
|
-
select: "Select"
|
|
7652
|
-
},
|
|
7653
|
-
de: {
|
|
7654
|
-
select: "Ausw\xE4hlen"
|
|
7655
|
-
}
|
|
7656
|
-
};
|
|
7657
7723
|
var SingleSelectProperty = ({
|
|
7658
7724
|
overwriteTranslation,
|
|
7659
7725
|
value,
|
|
@@ -7664,7 +7730,7 @@ var SingleSelectProperty = ({
|
|
|
7664
7730
|
onRemove,
|
|
7665
7731
|
...selectProps
|
|
7666
7732
|
}) => {
|
|
7667
|
-
const translation = useTranslation(
|
|
7733
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7668
7734
|
const hasValue = value !== void 0;
|
|
7669
7735
|
return /* @__PURE__ */ jsx52(
|
|
7670
7736
|
PropertyBase,
|
|
@@ -7687,7 +7753,7 @@ var SingleSelectProperty = ({
|
|
|
7687
7753
|
options,
|
|
7688
7754
|
isDisabled: readOnly,
|
|
7689
7755
|
className: clsx39("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
|
|
7690
|
-
hintText: `${translation
|
|
7756
|
+
hintText: `${translation("select")}...`
|
|
7691
7757
|
}
|
|
7692
7758
|
)
|
|
7693
7759
|
}
|
|
@@ -7800,10 +7866,10 @@ var TextareaUncontrolled = ({
|
|
|
7800
7866
|
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
7801
7867
|
var defaultTextPropertyTranslation = {
|
|
7802
7868
|
en: {
|
|
7803
|
-
|
|
7869
|
+
text: "Text"
|
|
7804
7870
|
},
|
|
7805
7871
|
de: {
|
|
7806
|
-
|
|
7872
|
+
text: "Text"
|
|
7807
7873
|
}
|
|
7808
7874
|
};
|
|
7809
7875
|
var TextProperty = ({
|
|
@@ -7815,7 +7881,7 @@ var TextProperty = ({
|
|
|
7815
7881
|
onEditComplete = noop,
|
|
7816
7882
|
...baseProps
|
|
7817
7883
|
}) => {
|
|
7818
|
-
const translation = useTranslation(defaultTextPropertyTranslation, overwriteTranslation);
|
|
7884
|
+
const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
|
|
7819
7885
|
const hasValue = value !== void 0;
|
|
7820
7886
|
return /* @__PURE__ */ jsx54(
|
|
7821
7887
|
PropertyBase,
|
|
@@ -7836,7 +7902,7 @@ var TextProperty = ({
|
|
|
7836
7902
|
defaultStyle: false,
|
|
7837
7903
|
value: value ?? "",
|
|
7838
7904
|
readOnly,
|
|
7839
|
-
placeholder: `${translation
|
|
7905
|
+
placeholder: `${translation("text")}...`,
|
|
7840
7906
|
onChangeText: (value2) => {
|
|
7841
7907
|
if (!value2) {
|
|
7842
7908
|
onRemove();
|
|
@@ -7862,46 +7928,6 @@ var TextProperty = ({
|
|
|
7862
7928
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
7863
7929
|
import clsx42 from "clsx";
|
|
7864
7930
|
import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7865
|
-
var defaultTimeTranslation = {
|
|
7866
|
-
en: {
|
|
7867
|
-
clear: "Clear",
|
|
7868
|
-
change: "Change",
|
|
7869
|
-
year: "Year",
|
|
7870
|
-
month: "Month",
|
|
7871
|
-
day: "Day",
|
|
7872
|
-
january: "January",
|
|
7873
|
-
february: "Febuary",
|
|
7874
|
-
march: "March",
|
|
7875
|
-
april: "April",
|
|
7876
|
-
may: "May",
|
|
7877
|
-
june: "June",
|
|
7878
|
-
july: "July",
|
|
7879
|
-
august: "August",
|
|
7880
|
-
september: "September",
|
|
7881
|
-
october: "October",
|
|
7882
|
-
november: "November",
|
|
7883
|
-
december: "December"
|
|
7884
|
-
},
|
|
7885
|
-
de: {
|
|
7886
|
-
clear: "Entfernen",
|
|
7887
|
-
change: "\xC4ndern",
|
|
7888
|
-
year: "Jahr",
|
|
7889
|
-
month: "Monat",
|
|
7890
|
-
day: "Tag",
|
|
7891
|
-
january: "Januar",
|
|
7892
|
-
february: "Febuar",
|
|
7893
|
-
march: "M\xE4rz",
|
|
7894
|
-
april: "April",
|
|
7895
|
-
may: "Mai",
|
|
7896
|
-
june: "Juni",
|
|
7897
|
-
july: "Juli",
|
|
7898
|
-
august: "August",
|
|
7899
|
-
september: "September",
|
|
7900
|
-
october: "October",
|
|
7901
|
-
november: "November",
|
|
7902
|
-
december: "December"
|
|
7903
|
-
}
|
|
7904
|
-
};
|
|
7905
7931
|
var DateTimePicker = ({
|
|
7906
7932
|
overwriteTranslation,
|
|
7907
7933
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -7914,7 +7940,7 @@ var DateTimePicker = ({
|
|
|
7914
7940
|
timePickerProps,
|
|
7915
7941
|
datePickerProps
|
|
7916
7942
|
}) => {
|
|
7917
|
-
const translation = useTranslation(
|
|
7943
|
+
const translation = useTranslation([formTranslation, timeTranslation], overwriteTranslation);
|
|
7918
7944
|
const useDate = mode === "dateTime" || mode === "date";
|
|
7919
7945
|
const useTime = mode === "dateTime" || mode === "time";
|
|
7920
7946
|
let dateDisplay;
|
|
@@ -7951,13 +7977,13 @@ var DateTimePicker = ({
|
|
|
7951
7977
|
timeDisplay
|
|
7952
7978
|
] }),
|
|
7953
7979
|
/* @__PURE__ */ jsx55("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs36("div", { className: "row gap-x-2 mt-1", children: [
|
|
7954
|
-
/* @__PURE__ */ jsx55(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation
|
|
7980
|
+
/* @__PURE__ */ jsx55(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
7955
7981
|
/* @__PURE__ */ jsx55(
|
|
7956
7982
|
SolidButton,
|
|
7957
7983
|
{
|
|
7958
7984
|
size: "medium",
|
|
7959
7985
|
onClick: () => onFinish(value),
|
|
7960
|
-
children: translation
|
|
7986
|
+
children: translation("change")
|
|
7961
7987
|
}
|
|
7962
7988
|
)
|
|
7963
7989
|
] }) })
|
|
@@ -8504,6 +8530,7 @@ export {
|
|
|
8504
8530
|
equalDate,
|
|
8505
8531
|
equalSizeGroups,
|
|
8506
8532
|
filterNews,
|
|
8533
|
+
formTranslation,
|
|
8507
8534
|
formatDate,
|
|
8508
8535
|
formatDateTime,
|
|
8509
8536
|
generateShadingColors,
|
|
@@ -8514,6 +8541,7 @@ export {
|
|
|
8514
8541
|
isDataObjectSelected,
|
|
8515
8542
|
isInTimeSpan,
|
|
8516
8543
|
localizedNewsSchema,
|
|
8544
|
+
monthTranslation,
|
|
8517
8545
|
monthsList,
|
|
8518
8546
|
newsListSchema,
|
|
8519
8547
|
newsSchema,
|
|
@@ -8523,6 +8551,7 @@ export {
|
|
|
8523
8551
|
removeFromTableSelection,
|
|
8524
8552
|
shadingColorValues,
|
|
8525
8553
|
subtractDuration,
|
|
8554
|
+
timeTranslation,
|
|
8526
8555
|
updatePagination,
|
|
8527
8556
|
useHoverState,
|
|
8528
8557
|
useLanguage,
|