@helpwave/hightide 0.1.8 → 0.1.10
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 +125 -13
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +125 -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 +129 -37
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +129 -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 +163 -23
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +163 -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 +158 -10
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +158 -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 +153 -13
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +153 -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 +157 -11
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +157 -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 +153 -15
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +153 -15
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +153 -13
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.mjs +153 -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 +161 -19
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +161 -19
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js +56 -8
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +56 -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 +155 -15
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +155 -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 +153 -13
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +153 -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 +164 -26
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +164 -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 +168 -46
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +168 -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 +164 -26
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +164 -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 +170 -24
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +170 -24
- 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 +178 -30
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +178 -30
- 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 +155 -25
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +155 -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 +153 -13
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +153 -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 +169 -43
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +169 -43
- 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 +155 -15
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +155 -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 +153 -13
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +153 -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 +159 -29
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +159 -29
- 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 +157 -17
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +157 -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 +223 -51
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +223 -51
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Menu.js +1 -1
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +1 -1
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +5 -9
- package/dist/components/user-action/MultiSelect.d.ts +5 -9
- package/dist/components/user-action/MultiSelect.js +165 -23
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +165 -23
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +158 -12
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +158 -12
- 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 +345 -303
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +341 -303
- 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 +38 -6
- package/dist/localization/useTranslation.d.ts +38 -6
- package/dist/localization/useTranslation.js +56 -6
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +55 -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,63 @@ var LanguageProvider = ({ initialLanguage, children }) => {
|
|
|
3148
3148
|
};
|
|
3149
3149
|
|
|
3150
3150
|
// src/localization/useTranslation.ts
|
|
3151
|
-
var
|
|
3152
|
-
|
|
3151
|
+
var TranslationPluralCount = {
|
|
3152
|
+
zero: 0,
|
|
3153
|
+
one: 1,
|
|
3154
|
+
two: 2,
|
|
3155
|
+
few: 3,
|
|
3156
|
+
many: 11,
|
|
3157
|
+
other: -1
|
|
3158
|
+
};
|
|
3159
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
3160
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
3153
3161
|
const { language: inferredLanguage } = useLanguage();
|
|
3154
3162
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
3155
|
-
|
|
3156
|
-
if (overwrite
|
|
3157
|
-
|
|
3158
|
-
}
|
|
3159
|
-
return
|
|
3163
|
+
const usedTranslations = [...translations];
|
|
3164
|
+
if (overwrite) {
|
|
3165
|
+
usedTranslations.push(overwrite);
|
|
3166
|
+
}
|
|
3167
|
+
return (key, options) => {
|
|
3168
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
3169
|
+
try {
|
|
3170
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
3171
|
+
const translation = translations[i];
|
|
3172
|
+
const localizedTranslation = translation[usedLanguage];
|
|
3173
|
+
if (!localizedTranslation) {
|
|
3174
|
+
continue;
|
|
3175
|
+
}
|
|
3176
|
+
const value = localizedTranslation[key];
|
|
3177
|
+
if (!value) {
|
|
3178
|
+
continue;
|
|
3179
|
+
}
|
|
3180
|
+
let forProcessing;
|
|
3181
|
+
if (typeof value !== "string") {
|
|
3182
|
+
if (count === TranslationPluralCount.zero && value?.zero) {
|
|
3183
|
+
forProcessing = value.zero;
|
|
3184
|
+
} else if (count === TranslationPluralCount.one && value?.one) {
|
|
3185
|
+
forProcessing = value.one;
|
|
3186
|
+
} else if (count === TranslationPluralCount.two && value?.two) {
|
|
3187
|
+
forProcessing = value.two;
|
|
3188
|
+
} else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
|
|
3189
|
+
forProcessing = value.few;
|
|
3190
|
+
} else if (count > TranslationPluralCount.many && value?.many) {
|
|
3191
|
+
forProcessing = value.many;
|
|
3192
|
+
} else {
|
|
3193
|
+
forProcessing = value.other;
|
|
3194
|
+
}
|
|
3195
|
+
} else {
|
|
3196
|
+
forProcessing = value;
|
|
3197
|
+
}
|
|
3198
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
3199
|
+
return replacements[placeholder] ?? `{{key:${placeholder}}}`;
|
|
3200
|
+
});
|
|
3201
|
+
return forProcessing;
|
|
3202
|
+
}
|
|
3203
|
+
} catch (e) {
|
|
3204
|
+
console.error(e);
|
|
3205
|
+
}
|
|
3206
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
3207
|
+
};
|
|
3160
3208
|
};
|
|
3161
3209
|
|
|
3162
3210
|
// src/util/noop.ts
|
|
@@ -3870,16 +3918,80 @@ var DayPickerUncontrolled = ({
|
|
|
3870
3918
|
);
|
|
3871
3919
|
};
|
|
3872
3920
|
|
|
3873
|
-
// src/
|
|
3874
|
-
|
|
3875
|
-
var defaultDatePickerTranslation = {
|
|
3921
|
+
// src/localization/defaults/time.ts
|
|
3922
|
+
var monthTranslation = {
|
|
3876
3923
|
en: {
|
|
3877
|
-
|
|
3924
|
+
january: "January",
|
|
3925
|
+
february: "Febuary",
|
|
3926
|
+
march: "March",
|
|
3927
|
+
april: "April",
|
|
3928
|
+
may: "May",
|
|
3929
|
+
june: "June",
|
|
3930
|
+
july: "July",
|
|
3931
|
+
august: "August",
|
|
3932
|
+
september: "September",
|
|
3933
|
+
october: "October",
|
|
3934
|
+
november: "November",
|
|
3935
|
+
december: "December"
|
|
3878
3936
|
},
|
|
3879
3937
|
de: {
|
|
3880
|
-
|
|
3938
|
+
january: "Januar",
|
|
3939
|
+
february: "Febuar",
|
|
3940
|
+
march: "M\xE4rz",
|
|
3941
|
+
april: "April",
|
|
3942
|
+
may: "Mai",
|
|
3943
|
+
june: "Juni",
|
|
3944
|
+
july: "Juli",
|
|
3945
|
+
august: "August",
|
|
3946
|
+
september: "September",
|
|
3947
|
+
october: "October",
|
|
3948
|
+
november: "November",
|
|
3949
|
+
december: "December"
|
|
3881
3950
|
}
|
|
3882
3951
|
};
|
|
3952
|
+
var timeTranslation = {
|
|
3953
|
+
en: {
|
|
3954
|
+
...monthTranslation.en,
|
|
3955
|
+
century: { one: "Century", other: "Centuries" },
|
|
3956
|
+
decade: { one: "Decade", other: "Decades" },
|
|
3957
|
+
year: { one: "Year", other: "Years" },
|
|
3958
|
+
month: { one: "Month", other: "Months" },
|
|
3959
|
+
day: { one: "Day", other: "Days" },
|
|
3960
|
+
hour: { one: "Hour", other: "Hours" },
|
|
3961
|
+
minute: { one: "Minute", other: "Minutes" },
|
|
3962
|
+
second: { one: "Second", other: "Seconds" },
|
|
3963
|
+
millisecond: { one: "Millisecond", other: "Milliseconds" },
|
|
3964
|
+
microsecond: { one: "Microsecond", other: "Microseconds" },
|
|
3965
|
+
nanosecond: { one: "Nanosecond", other: "Nanoseconds" },
|
|
3966
|
+
yesterday: "Yesterday",
|
|
3967
|
+
today: "Today",
|
|
3968
|
+
tomorrow: "Tomorrow",
|
|
3969
|
+
in: "in",
|
|
3970
|
+
ago: "ago"
|
|
3971
|
+
},
|
|
3972
|
+
de: {
|
|
3973
|
+
...monthTranslation.de,
|
|
3974
|
+
century: { one: "Jahrhundert", other: "Jahrhunderte" },
|
|
3975
|
+
decade: { one: "Jahrzehnt", other: "Jahrzehnte" },
|
|
3976
|
+
year: { one: "Jahr", other: "Jahre" },
|
|
3977
|
+
month: { one: "Monat", other: "Monate" },
|
|
3978
|
+
day: { one: "Tag", other: "Tage" },
|
|
3979
|
+
hour: { one: "Stunde", other: "Stunden" },
|
|
3980
|
+
minute: { one: "Minute", other: "Minuten" },
|
|
3981
|
+
second: { one: "Sekunde", other: "Sekunden" },
|
|
3982
|
+
millisecond: { one: "Millisekunde", other: "Millisekunden" },
|
|
3983
|
+
microsecond: { one: "Mikrosekunde", other: "Mikrosekunden" },
|
|
3984
|
+
nanosecond: { one: "Nanosekunde", other: "Nanosekunden" },
|
|
3985
|
+
yesterday: "Gestern",
|
|
3986
|
+
today: "Heute",
|
|
3987
|
+
tomorrow: "Morgen",
|
|
3988
|
+
in: "in",
|
|
3989
|
+
ago: "vor"
|
|
3990
|
+
}
|
|
3991
|
+
};
|
|
3992
|
+
|
|
3993
|
+
// src/components/date/DatePicker.tsx
|
|
3994
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3883
3995
|
var DatePicker = ({
|
|
3884
3996
|
overwriteTranslation,
|
|
3885
3997
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -3892,7 +4004,7 @@ var DatePicker = ({
|
|
|
3892
4004
|
className = ""
|
|
3893
4005
|
}) => {
|
|
3894
4006
|
const locale = useLocale();
|
|
3895
|
-
const translation = useTranslation(
|
|
4007
|
+
const translation = useTranslation([timeTranslation], overwriteTranslation);
|
|
3896
4008
|
const [displayedMonth, setDisplayedMonth] = useState6(value);
|
|
3897
4009
|
const [displayMode, setDisplayMode] = useState6(initialDisplay);
|
|
3898
4010
|
useEffect6(() => {
|
|
@@ -3975,7 +4087,7 @@ var DatePicker = ({
|
|
|
3975
4087
|
newDate.setHours(value.getHours(), value.getMinutes());
|
|
3976
4088
|
onChange(newDate);
|
|
3977
4089
|
},
|
|
3978
|
-
children: translation
|
|
4090
|
+
children: translation("today")
|
|
3979
4091
|
}
|
|
3980
4092
|
) })
|
|
3981
4093
|
] })
|
|
@@ -4005,42 +4117,14 @@ var DatePickerUncontrolled = ({
|
|
|
4005
4117
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4006
4118
|
var defaultTimeDisplayTranslations = {
|
|
4007
4119
|
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"
|
|
4120
|
+
...timeTranslation.en,
|
|
4121
|
+
inDays: `in {{days}} days`,
|
|
4122
|
+
agoDays: `{{days}} days ago`
|
|
4025
4123
|
},
|
|
4026
4124
|
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"
|
|
4125
|
+
...timeTranslation.de,
|
|
4126
|
+
inDays: `in {{days}} Tagen`,
|
|
4127
|
+
agoDays: `vor {{days}} Tagen`
|
|
4044
4128
|
}
|
|
4045
4129
|
};
|
|
4046
4130
|
var TimeDisplay = ({
|
|
@@ -4048,31 +4132,31 @@ var TimeDisplay = ({
|
|
|
4048
4132
|
date,
|
|
4049
4133
|
mode = "daysFromToday"
|
|
4050
4134
|
}) => {
|
|
4051
|
-
const translation = useTranslation(defaultTimeDisplayTranslations, overwriteTranslation);
|
|
4135
|
+
const translation = useTranslation([defaultTimeDisplayTranslations], overwriteTranslation);
|
|
4052
4136
|
const difference = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0).valueOf() - new Date(date).setHours(0, 0, 0, 0).valueOf();
|
|
4053
4137
|
const isBefore = difference > 0;
|
|
4054
4138
|
const differenceInDays = Math.floor(Math.abs(difference) / (1e3 * 3600 * 24));
|
|
4055
4139
|
let displayString;
|
|
4056
4140
|
if (differenceInDays === 0) {
|
|
4057
|
-
displayString = translation
|
|
4141
|
+
displayString = translation("today");
|
|
4058
4142
|
} else if (differenceInDays === 1) {
|
|
4059
|
-
displayString = isBefore ? translation
|
|
4143
|
+
displayString = isBefore ? translation("yesterday") : translation("tomorrow");
|
|
4060
4144
|
} else {
|
|
4061
|
-
displayString = isBefore ? translation.
|
|
4145
|
+
displayString = isBefore ? translation("agoDays", { replacements: { days: differenceInDays.toString() } }) : translation("inDays", { replacements: { days: differenceInDays.toString() } });
|
|
4062
4146
|
}
|
|
4063
4147
|
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
|
|
4148
|
+
0: translation("january"),
|
|
4149
|
+
1: translation("february"),
|
|
4150
|
+
2: translation("march"),
|
|
4151
|
+
3: translation("april"),
|
|
4152
|
+
4: translation("may"),
|
|
4153
|
+
5: translation("june"),
|
|
4154
|
+
6: translation("july"),
|
|
4155
|
+
7: translation("august"),
|
|
4156
|
+
8: translation("september"),
|
|
4157
|
+
9: translation("october"),
|
|
4158
|
+
10: translation("november"),
|
|
4159
|
+
11: translation("december")
|
|
4076
4160
|
};
|
|
4077
4161
|
let fullString;
|
|
4078
4162
|
if (mode === "daysFromToday") {
|
|
@@ -4342,6 +4426,108 @@ var Tooltip = ({
|
|
|
4342
4426
|
|
|
4343
4427
|
// src/components/layout-and-navigation/Overlay.tsx
|
|
4344
4428
|
import { X } from "lucide-react";
|
|
4429
|
+
|
|
4430
|
+
// src/localization/defaults/form.ts
|
|
4431
|
+
var formTranslation = {
|
|
4432
|
+
en: {
|
|
4433
|
+
all: "All",
|
|
4434
|
+
back: "Back",
|
|
4435
|
+
cancel: "Cancel",
|
|
4436
|
+
change: "Change",
|
|
4437
|
+
clear: "Clear",
|
|
4438
|
+
close: "Close",
|
|
4439
|
+
confirm: "Confirm",
|
|
4440
|
+
decline: "Decline",
|
|
4441
|
+
delete: "Delete",
|
|
4442
|
+
discard: "Discard",
|
|
4443
|
+
discardChanges: "Discard Changes",
|
|
4444
|
+
done: "Done",
|
|
4445
|
+
edit: "Edit",
|
|
4446
|
+
enterText: "Enter text here",
|
|
4447
|
+
error: "Error",
|
|
4448
|
+
exit: "Exit",
|
|
4449
|
+
fieldRequiredError: "This field is required.",
|
|
4450
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
4451
|
+
less: "Less",
|
|
4452
|
+
loading: "Loading",
|
|
4453
|
+
maxLengthError: "Maximum length exceeded.",
|
|
4454
|
+
minLengthError: "Minimum length not met.",
|
|
4455
|
+
more: "More",
|
|
4456
|
+
next: "Next",
|
|
4457
|
+
no: "No",
|
|
4458
|
+
none: "None",
|
|
4459
|
+
of: "of",
|
|
4460
|
+
optional: "Optional",
|
|
4461
|
+
pleaseWait: "Please wait...",
|
|
4462
|
+
previous: "Previous",
|
|
4463
|
+
remove: "Remove",
|
|
4464
|
+
required: "Required",
|
|
4465
|
+
reset: "Reset",
|
|
4466
|
+
save: "Save",
|
|
4467
|
+
search: "Search",
|
|
4468
|
+
select: "Select",
|
|
4469
|
+
selectOption: "Select an option",
|
|
4470
|
+
show: "Show",
|
|
4471
|
+
showMore: "Show more",
|
|
4472
|
+
showLess: "Show less",
|
|
4473
|
+
submit: "Submit",
|
|
4474
|
+
success: "Success",
|
|
4475
|
+
update: "Update",
|
|
4476
|
+
unsavedChanges: "Unsaved Changes",
|
|
4477
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
4478
|
+
yes: "Yes"
|
|
4479
|
+
},
|
|
4480
|
+
de: {
|
|
4481
|
+
all: "Alle",
|
|
4482
|
+
back: "Zur\xFCck",
|
|
4483
|
+
cancel: "Abbrechen",
|
|
4484
|
+
change: "\xC4ndern",
|
|
4485
|
+
clear: "L\xF6schen",
|
|
4486
|
+
close: "Schlie\xDFen",
|
|
4487
|
+
confirm: "Best\xE4tigen",
|
|
4488
|
+
decline: "Ablehnen",
|
|
4489
|
+
delete: "L\xF6schen",
|
|
4490
|
+
discard: "Verwerfen",
|
|
4491
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
4492
|
+
done: "Fertig",
|
|
4493
|
+
edit: "Bearbeiten",
|
|
4494
|
+
enterText: "Text hier eingeben",
|
|
4495
|
+
error: "Fehler",
|
|
4496
|
+
exit: "Beenden",
|
|
4497
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
4498
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
4499
|
+
less: "Weniger",
|
|
4500
|
+
loading: "L\xE4dt",
|
|
4501
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
4502
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
4503
|
+
more: "Mehr",
|
|
4504
|
+
next: "Weiter",
|
|
4505
|
+
no: "Nein",
|
|
4506
|
+
none: "Nichts",
|
|
4507
|
+
of: "von",
|
|
4508
|
+
optional: "Optional",
|
|
4509
|
+
pleaseWait: "Bitte warten...",
|
|
4510
|
+
previous: "Vorherige",
|
|
4511
|
+
remove: "Entfernen",
|
|
4512
|
+
required: "Erforderlich",
|
|
4513
|
+
reset: "Zur\xFCcksetzen",
|
|
4514
|
+
save: "Speichern",
|
|
4515
|
+
search: "Suche",
|
|
4516
|
+
select: "Select",
|
|
4517
|
+
selectOption: "Option ausw\xE4hlen",
|
|
4518
|
+
show: "Anzeigen",
|
|
4519
|
+
showMore: "Mehr anzeigen",
|
|
4520
|
+
showLess: "Weniger anzeigen",
|
|
4521
|
+
submit: "Abschicken",
|
|
4522
|
+
success: "Erfolg",
|
|
4523
|
+
update: "Update",
|
|
4524
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
4525
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
4526
|
+
yes: "Ja"
|
|
4527
|
+
}
|
|
4528
|
+
};
|
|
4529
|
+
|
|
4530
|
+
// src/components/layout-and-navigation/Overlay.tsx
|
|
4345
4531
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4346
4532
|
var Overlay = ({
|
|
4347
4533
|
children,
|
|
@@ -4371,10 +4557,10 @@ var Overlay = ({
|
|
|
4371
4557
|
var overlayStack = [];
|
|
4372
4558
|
var defaultModalHeaderTranslation = {
|
|
4373
4559
|
en: {
|
|
4374
|
-
|
|
4560
|
+
...formTranslation.en
|
|
4375
4561
|
},
|
|
4376
4562
|
de: {
|
|
4377
|
-
|
|
4563
|
+
...formTranslation.de
|
|
4378
4564
|
}
|
|
4379
4565
|
};
|
|
4380
4566
|
var OverlayHeader = ({
|
|
@@ -4385,7 +4571,7 @@ var OverlayHeader = ({
|
|
|
4385
4571
|
description,
|
|
4386
4572
|
descriptionText = ""
|
|
4387
4573
|
}) => {
|
|
4388
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
4574
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
4389
4575
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
4390
4576
|
const titleRow = /* @__PURE__ */ jsxs9("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
4391
4577
|
title ?? /* @__PURE__ */ jsx13(
|
|
@@ -4397,7 +4583,7 @@ var OverlayHeader = ({
|
|
|
4397
4583
|
children: titleText
|
|
4398
4584
|
}
|
|
4399
4585
|
),
|
|
4400
|
-
!!onClose && /* @__PURE__ */ jsx13(Tooltip, { tooltip: translation
|
|
4586
|
+
!!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
4587
|
] });
|
|
4402
4588
|
return /* @__PURE__ */ jsxs9("div", { className: "col", children: [
|
|
4403
4589
|
hasTitleRow && titleRow,
|
|
@@ -4548,16 +4734,6 @@ var Dialog = ({
|
|
|
4548
4734
|
|
|
4549
4735
|
// src/components/dialogs/ConfirmDialog.tsx
|
|
4550
4736
|
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
4737
|
var ConfirmDialog = ({
|
|
4562
4738
|
overwriteTranslation,
|
|
4563
4739
|
children,
|
|
@@ -4568,7 +4744,7 @@ var ConfirmDialog = ({
|
|
|
4568
4744
|
className,
|
|
4569
4745
|
...restProps
|
|
4570
4746
|
}) => {
|
|
4571
|
-
const translation = useTranslation(
|
|
4747
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
4572
4748
|
const mapping = {
|
|
4573
4749
|
neutral: "primary",
|
|
4574
4750
|
negative: "negative",
|
|
@@ -4584,7 +4760,7 @@ var ConfirmDialog = ({
|
|
|
4584
4760
|
color: buttonOverwrites?.[0].color ?? "negative",
|
|
4585
4761
|
onClick: onDecline,
|
|
4586
4762
|
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
4587
|
-
children: buttonOverwrites?.[0].text ?? translation
|
|
4763
|
+
children: buttonOverwrites?.[0].text ?? translation("decline")
|
|
4588
4764
|
}
|
|
4589
4765
|
),
|
|
4590
4766
|
/* @__PURE__ */ jsx14(
|
|
@@ -4594,7 +4770,7 @@ var ConfirmDialog = ({
|
|
|
4594
4770
|
color: buttonOverwrites?.[1].color ?? mapping[confirmType],
|
|
4595
4771
|
onClick: onConfirm,
|
|
4596
4772
|
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
4597
|
-
children: buttonOverwrites?.[1].text ?? translation
|
|
4773
|
+
children: buttonOverwrites?.[1].text ?? translation("confirm")
|
|
4598
4774
|
}
|
|
4599
4775
|
)
|
|
4600
4776
|
] })
|
|
@@ -5770,21 +5946,13 @@ var FAQSection = ({
|
|
|
5770
5946
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
5771
5947
|
import clsx21 from "clsx";
|
|
5772
5948
|
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
5949
|
var Pagination = ({
|
|
5782
5950
|
overwriteTranslation,
|
|
5783
5951
|
page,
|
|
5784
5952
|
numberOfPages,
|
|
5785
5953
|
onPageChanged
|
|
5786
5954
|
}) => {
|
|
5787
|
-
const translation = useTranslation(
|
|
5955
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
5788
5956
|
const changePage = (page2) => {
|
|
5789
5957
|
onPageChanged(page2);
|
|
5790
5958
|
};
|
|
@@ -5796,7 +5964,7 @@ var Pagination = ({
|
|
|
5796
5964
|
/* @__PURE__ */ jsx25("button", { onClick: () => changePage(page - 1), disabled: onFirstPage, children: /* @__PURE__ */ jsx25(ChevronLeft2, { className: clsx21({ "opacity-30": onFirstPage }) }) }),
|
|
5797
5965
|
/* @__PURE__ */ jsxs16("div", { className: "min-w-[80px] justify-center mx-2", children: [
|
|
5798
5966
|
/* @__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
|
|
5967
|
+
/* @__PURE__ */ jsx25("span", { className: "select-none mx-2", children: translation("of") }),
|
|
5800
5968
|
/* @__PURE__ */ jsx25("span", { className: "select-none text-left flex-1", children: numberOfPages })
|
|
5801
5969
|
] }),
|
|
5802
5970
|
/* @__PURE__ */ jsx25("button", { onClick: () => changePage(page + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx25(ChevronRight2, { className: clsx21({ "opacity-30": onLastPage }) }) }),
|
|
@@ -6041,11 +6209,9 @@ var useSearch = ({
|
|
|
6041
6209
|
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
6042
6210
|
var defaultSearchableListTranslation = {
|
|
6043
6211
|
en: {
|
|
6044
|
-
search: "Search",
|
|
6045
6212
|
nothingFound: "Nothing found"
|
|
6046
6213
|
},
|
|
6047
6214
|
de: {
|
|
6048
|
-
search: "Suche",
|
|
6049
6215
|
nothingFound: "Nichts gefunden"
|
|
6050
6216
|
}
|
|
6051
6217
|
};
|
|
@@ -6060,7 +6226,7 @@ var SearchableList = ({
|
|
|
6060
6226
|
className,
|
|
6061
6227
|
resultListClassName
|
|
6062
6228
|
}) => {
|
|
6063
|
-
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
6229
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
6064
6230
|
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
6065
6231
|
return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
|
|
6066
6232
|
list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
@@ -6069,14 +6235,14 @@ var SearchableList = ({
|
|
|
6069
6235
|
{
|
|
6070
6236
|
value: search,
|
|
6071
6237
|
onChangeText: setSearch,
|
|
6072
|
-
placeholder: translation
|
|
6238
|
+
placeholder: translation("search"),
|
|
6073
6239
|
autoFocus,
|
|
6074
6240
|
className: "w-full"
|
|
6075
6241
|
}
|
|
6076
6242
|
),
|
|
6077
6243
|
/* @__PURE__ */ jsx28(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx28(Search, { className: "w-full h-full" }) })
|
|
6078
6244
|
] }),
|
|
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
|
|
6245
|
+
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
6246
|
] });
|
|
6081
6247
|
};
|
|
6082
6248
|
|
|
@@ -6085,18 +6251,6 @@ import { Check as Check2, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRi
|
|
|
6085
6251
|
import clsx25 from "clsx";
|
|
6086
6252
|
import { useEffect as useEffect15, useState as useState15 } from "react";
|
|
6087
6253
|
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
6254
|
var defaultState = {
|
|
6101
6255
|
currentStep: 0,
|
|
6102
6256
|
seenSteps: /* @__PURE__ */ new Set([0])
|
|
@@ -6112,7 +6266,7 @@ var StepperBar = ({
|
|
|
6112
6266
|
showDots = true,
|
|
6113
6267
|
className = ""
|
|
6114
6268
|
}) => {
|
|
6115
|
-
const translation = useTranslation(
|
|
6269
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6116
6270
|
const dots = range(0, numberOfSteps);
|
|
6117
6271
|
const { currentStep, seenSteps } = state ?? defaultState;
|
|
6118
6272
|
const update = (newStep) => {
|
|
@@ -6134,7 +6288,7 @@ var StepperBar = ({
|
|
|
6134
6288
|
className: "row gap-x-1 items-center justify-center",
|
|
6135
6289
|
children: [
|
|
6136
6290
|
/* @__PURE__ */ jsx29(ChevronLeft3, { size: 14 }),
|
|
6137
|
-
translation
|
|
6291
|
+
translation("back")
|
|
6138
6292
|
]
|
|
6139
6293
|
}
|
|
6140
6294
|
) }),
|
|
@@ -6167,7 +6321,7 @@ var StepperBar = ({
|
|
|
6167
6321
|
className: "row gap-x-1 items-center justify-center",
|
|
6168
6322
|
disabled: disabledSteps.has(currentStep),
|
|
6169
6323
|
children: [
|
|
6170
|
-
translation
|
|
6324
|
+
translation("next"),
|
|
6171
6325
|
/* @__PURE__ */ jsx29(ChevronRight3, { size: 14 })
|
|
6172
6326
|
]
|
|
6173
6327
|
}
|
|
@@ -6180,7 +6334,7 @@ var StepperBar = ({
|
|
|
6180
6334
|
className: "row gap-x-1 items-center justify-center",
|
|
6181
6335
|
children: [
|
|
6182
6336
|
/* @__PURE__ */ jsx29(Check2, { size: 14 }),
|
|
6183
|
-
finishText ?? translation
|
|
6337
|
+
finishText ?? translation("confirm")
|
|
6184
6338
|
]
|
|
6185
6339
|
}
|
|
6186
6340
|
) })
|
|
@@ -6544,14 +6698,6 @@ var SortButton = ({
|
|
|
6544
6698
|
// src/components/layout-and-navigation/TextImage.tsx
|
|
6545
6699
|
import clsx28 from "clsx";
|
|
6546
6700
|
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
6701
|
var TextImage = ({
|
|
6556
6702
|
overwriteTranslation,
|
|
6557
6703
|
title,
|
|
@@ -6563,11 +6709,11 @@ var TextImage = ({
|
|
|
6563
6709
|
contentClassName = "",
|
|
6564
6710
|
className = ""
|
|
6565
6711
|
}) => {
|
|
6566
|
-
const translation = useTranslation(
|
|
6712
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6567
6713
|
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-
|
|
6714
|
+
primary: "text-text-image-primary-background bg-text-image-primary-text",
|
|
6715
|
+
secondary: "text-text-image-secondary-background bg-text-image-secondary-text",
|
|
6716
|
+
dark: "text-text-image-dark-background bg-text-image-dark-text"
|
|
6571
6717
|
};
|
|
6572
6718
|
const colorMapping = {
|
|
6573
6719
|
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 +6733,12 @@ var TextImage = ({
|
|
|
6587
6733
|
{
|
|
6588
6734
|
className: clsx28(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
|
|
6589
6735
|
children: [
|
|
6590
|
-
badge && /* @__PURE__ */ jsx32("div", { className: clsx28(`chip-full
|
|
6591
|
-
/* @__PURE__ */ jsxs22("div", { className: "col gap-y-1
|
|
6736
|
+
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 }) }),
|
|
6737
|
+
/* @__PURE__ */ jsxs22("div", { className: "col gap-y-1 overflow-hidden", children: [
|
|
6592
6738
|
/* @__PURE__ */ jsx32("span", { className: "textstyle-title-xl", children: title }),
|
|
6593
6739
|
/* @__PURE__ */ jsx32("span", { className: "text-ellipsis overflow-hidden", children: description })
|
|
6594
6740
|
] }),
|
|
6595
|
-
onShowMoreClicked && /* @__PURE__ */ jsx32("div", { className: "row mt-2
|
|
6741
|
+
onShowMoreClicked && /* @__PURE__ */ jsx32("div", { className: "row mt-2 underline", children: /* @__PURE__ */ jsx32("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
|
|
6596
6742
|
]
|
|
6597
6743
|
}
|
|
6598
6744
|
)
|
|
@@ -6670,10 +6816,10 @@ var ErrorComponent = ({
|
|
|
6670
6816
|
errorText,
|
|
6671
6817
|
classname
|
|
6672
6818
|
}) => {
|
|
6673
|
-
const translation = useTranslation(defaultErrorComponentTranslation, overwriteTranslation);
|
|
6819
|
+
const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
|
|
6674
6820
|
return /* @__PURE__ */ jsxs24("div", { className: clsx29("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
|
|
6675
6821
|
/* @__PURE__ */ jsx34(AlertOctagon, { size: 64, className: "text-warning" }),
|
|
6676
|
-
errorText ?? `${translation
|
|
6822
|
+
errorText ?? `${translation("errorOccurred")} :(`
|
|
6677
6823
|
] });
|
|
6678
6824
|
};
|
|
6679
6825
|
|
|
@@ -6683,23 +6829,15 @@ import { useState as useState18 } from "react";
|
|
|
6683
6829
|
// src/components/loading-states/LoadingAnimation.tsx
|
|
6684
6830
|
import clsx30 from "clsx";
|
|
6685
6831
|
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
6832
|
var LoadingAnimation = ({
|
|
6695
6833
|
overwriteTranslation,
|
|
6696
6834
|
loadingText,
|
|
6697
6835
|
classname
|
|
6698
6836
|
}) => {
|
|
6699
|
-
const translation = useTranslation(
|
|
6837
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6700
6838
|
return /* @__PURE__ */ jsxs25("div", { className: clsx30("col items-center justify-center w-full h-24", classname), children: [
|
|
6701
6839
|
/* @__PURE__ */ jsx35(Helpwave, { animate: "loading" }),
|
|
6702
|
-
loadingText ?? `${translation
|
|
6840
|
+
loadingText ?? `${translation("loading")}...`
|
|
6703
6841
|
] });
|
|
6704
6842
|
};
|
|
6705
6843
|
|
|
@@ -6801,18 +6939,6 @@ var ProgressIndicator = ({
|
|
|
6801
6939
|
// src/components/modals/ConfirmModal.tsx
|
|
6802
6940
|
import clsx32 from "clsx";
|
|
6803
6941
|
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
6942
|
var ConfirmModal = ({
|
|
6817
6943
|
overwriteTranslation,
|
|
6818
6944
|
children,
|
|
@@ -6824,7 +6950,7 @@ var ConfirmModal = ({
|
|
|
6824
6950
|
className,
|
|
6825
6951
|
...restProps
|
|
6826
6952
|
}) => {
|
|
6827
|
-
const translation = useTranslation(
|
|
6953
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6828
6954
|
const mapping = {
|
|
6829
6955
|
neutral: "neutral",
|
|
6830
6956
|
negative: "negative",
|
|
@@ -6840,7 +6966,7 @@ var ConfirmModal = ({
|
|
|
6840
6966
|
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
6841
6967
|
onClick: onCancel,
|
|
6842
6968
|
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
6843
|
-
children: buttonOverwrites?.[0].text ?? translation
|
|
6969
|
+
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
6844
6970
|
}
|
|
6845
6971
|
),
|
|
6846
6972
|
onDecline && /* @__PURE__ */ jsx39(
|
|
@@ -6849,7 +6975,7 @@ var ConfirmModal = ({
|
|
|
6849
6975
|
color: buttonOverwrites?.[1].color ?? "negative",
|
|
6850
6976
|
onClick: onDecline,
|
|
6851
6977
|
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
6852
|
-
children: buttonOverwrites?.[1].text ?? translation
|
|
6978
|
+
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
6853
6979
|
}
|
|
6854
6980
|
),
|
|
6855
6981
|
/* @__PURE__ */ jsx39(
|
|
@@ -6859,7 +6985,7 @@ var ConfirmModal = ({
|
|
|
6859
6985
|
color: buttonOverwrites?.[2].color ?? mapping[confirmType],
|
|
6860
6986
|
onClick: onConfirm,
|
|
6861
6987
|
disabled: buttonOverwrites?.[2].disabled ?? false,
|
|
6862
|
-
children: buttonOverwrites?.[2].text ?? translation
|
|
6988
|
+
children: buttonOverwrites?.[2].text ?? translation("confirm")
|
|
6863
6989
|
}
|
|
6864
6990
|
)
|
|
6865
6991
|
] })
|
|
@@ -6868,22 +6994,6 @@ var ConfirmModal = ({
|
|
|
6868
6994
|
|
|
6869
6995
|
// src/components/modals/DiscardChangesModal.tsx
|
|
6870
6996
|
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
6997
|
var DiscardChangesModal = ({
|
|
6888
6998
|
overwriteTranslation,
|
|
6889
6999
|
children,
|
|
@@ -6893,19 +7003,19 @@ var DiscardChangesModal = ({
|
|
|
6893
7003
|
headerProps,
|
|
6894
7004
|
...modalProps
|
|
6895
7005
|
}) => {
|
|
6896
|
-
const translation = useTranslation(
|
|
7006
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6897
7007
|
return /* @__PURE__ */ jsx40(
|
|
6898
7008
|
ConfirmModal,
|
|
6899
7009
|
{
|
|
6900
7010
|
headerProps: {
|
|
6901
7011
|
...headerProps,
|
|
6902
|
-
titleText: headerProps?.titleText ?? translation
|
|
6903
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7012
|
+
titleText: headerProps?.titleText ?? translation("unsavedChanges"),
|
|
7013
|
+
descriptionText: headerProps?.descriptionText ?? translation("unsavedChangesSaveQuestion")
|
|
6904
7014
|
},
|
|
6905
7015
|
onConfirm: onSave,
|
|
6906
7016
|
onCancel,
|
|
6907
7017
|
onDecline: onDontSave,
|
|
6908
|
-
buttonOverwrites: [{ text: translation
|
|
7018
|
+
buttonOverwrites: [{ text: translation("cancel") }, { text: translation("discardChanges") }, { text: translation("save") }],
|
|
6909
7019
|
...modalProps,
|
|
6910
7020
|
children
|
|
6911
7021
|
}
|
|
@@ -7004,7 +7114,7 @@ var Select = ({
|
|
|
7004
7114
|
"div",
|
|
7005
7115
|
{
|
|
7006
7116
|
ref: menuRef,
|
|
7007
|
-
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-
|
|
7117
|
+
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-lg max-h-[500px] overflow-y-auto p-2",
|
|
7008
7118
|
children: /* @__PURE__ */ jsx42(
|
|
7009
7119
|
SearchableList,
|
|
7010
7120
|
{
|
|
@@ -7065,14 +7175,14 @@ var SelectUncontrolled = ({
|
|
|
7065
7175
|
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7066
7176
|
var defaultLanguageModalTranslation = {
|
|
7067
7177
|
en: {
|
|
7068
|
-
|
|
7069
|
-
|
|
7178
|
+
language: "Language",
|
|
7179
|
+
chooseLanguage: "Choose your language",
|
|
7070
7180
|
done: "Done",
|
|
7071
7181
|
...LanguageUtil.languagesLocalNames
|
|
7072
7182
|
},
|
|
7073
7183
|
de: {
|
|
7074
|
-
|
|
7075
|
-
|
|
7184
|
+
language: "Sprache",
|
|
7185
|
+
chooseLanguage: "W\xE4hle deine bevorzugte Sprache",
|
|
7076
7186
|
done: "Fertig",
|
|
7077
7187
|
...LanguageUtil.languagesLocalNames
|
|
7078
7188
|
}
|
|
@@ -7084,14 +7194,14 @@ var LanguageModal = ({
|
|
|
7084
7194
|
...modalProps
|
|
7085
7195
|
}) => {
|
|
7086
7196
|
const { language, setLanguage } = useLanguage();
|
|
7087
|
-
const translation = useTranslation(defaultLanguageModalTranslation, overwriteTranslation);
|
|
7197
|
+
const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
|
|
7088
7198
|
return /* @__PURE__ */ jsx43(
|
|
7089
7199
|
Modal,
|
|
7090
7200
|
{
|
|
7091
7201
|
headerProps: {
|
|
7092
7202
|
...headerProps,
|
|
7093
|
-
titleText: headerProps?.titleText ?? translation
|
|
7094
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7203
|
+
titleText: headerProps?.titleText ?? translation("language"),
|
|
7204
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseLanguage")
|
|
7095
7205
|
},
|
|
7096
7206
|
onClose,
|
|
7097
7207
|
...modalProps,
|
|
@@ -7105,7 +7215,7 @@ var LanguageModal = ({
|
|
|
7105
7215
|
onChange: (language2) => setLanguage(language2)
|
|
7106
7216
|
}
|
|
7107
7217
|
),
|
|
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
|
|
7218
|
+
/* @__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
7219
|
] })
|
|
7110
7220
|
}
|
|
7111
7221
|
);
|
|
@@ -7118,11 +7228,19 @@ var themes = ["light", "dark"];
|
|
|
7118
7228
|
var defaultThemeTypeTranslation = {
|
|
7119
7229
|
en: {
|
|
7120
7230
|
dark: "Dark",
|
|
7121
|
-
light: "Light"
|
|
7231
|
+
light: "Light",
|
|
7232
|
+
theme: {
|
|
7233
|
+
one: "Theme",
|
|
7234
|
+
other: "Themes"
|
|
7235
|
+
}
|
|
7122
7236
|
},
|
|
7123
7237
|
de: {
|
|
7124
7238
|
dark: "Dunkel",
|
|
7125
|
-
light: "Hell"
|
|
7239
|
+
light: "Hell",
|
|
7240
|
+
theme: {
|
|
7241
|
+
one: "Farbschema",
|
|
7242
|
+
other: "Farbschemas"
|
|
7243
|
+
}
|
|
7126
7244
|
}
|
|
7127
7245
|
};
|
|
7128
7246
|
var ThemeUtil = {
|
|
@@ -7150,18 +7268,12 @@ var useTheme = () => useContext2(ThemeContext);
|
|
|
7150
7268
|
|
|
7151
7269
|
// src/components/modals/ThemeModal.tsx
|
|
7152
7270
|
import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7153
|
-
var
|
|
7271
|
+
var defaultConfirmDialogTranslation = {
|
|
7154
7272
|
en: {
|
|
7155
|
-
|
|
7156
|
-
message: "Choose your preferred theme",
|
|
7157
|
-
done: "Done",
|
|
7158
|
-
...ThemeUtil.translation.en
|
|
7273
|
+
chooseTheme: "Choose your preferred theme"
|
|
7159
7274
|
},
|
|
7160
7275
|
de: {
|
|
7161
|
-
|
|
7162
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
7163
|
-
done: "Fertig",
|
|
7164
|
-
...ThemeUtil.translation.en
|
|
7276
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
7165
7277
|
}
|
|
7166
7278
|
};
|
|
7167
7279
|
var ThemeModal = ({
|
|
@@ -7171,14 +7283,14 @@ var ThemeModal = ({
|
|
|
7171
7283
|
...modalProps
|
|
7172
7284
|
}) => {
|
|
7173
7285
|
const { theme, setTheme } = useTheme();
|
|
7174
|
-
const translation = useTranslation(
|
|
7286
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
7175
7287
|
return /* @__PURE__ */ jsx45(
|
|
7176
7288
|
Modal,
|
|
7177
7289
|
{
|
|
7178
7290
|
headerProps: {
|
|
7179
7291
|
...headerProps,
|
|
7180
|
-
titleText: headerProps?.titleText ?? translation
|
|
7181
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
7292
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
7293
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
7182
7294
|
},
|
|
7183
7295
|
onClose,
|
|
7184
7296
|
...modalProps,
|
|
@@ -7192,7 +7304,7 @@ var ThemeModal = ({
|
|
|
7192
7304
|
onChange: (theme2) => setTheme(theme2)
|
|
7193
7305
|
}
|
|
7194
7306
|
),
|
|
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
|
|
7307
|
+
/* @__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
7308
|
] })
|
|
7197
7309
|
}
|
|
7198
7310
|
);
|
|
@@ -7205,14 +7317,6 @@ import { Check as Check4 } from "lucide-react";
|
|
|
7205
7317
|
import { AlertTriangle } from "lucide-react";
|
|
7206
7318
|
import clsx34 from "clsx";
|
|
7207
7319
|
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
7320
|
var PropertyBase = ({
|
|
7217
7321
|
overwriteTranslation,
|
|
7218
7322
|
name,
|
|
@@ -7224,7 +7328,7 @@ var PropertyBase = ({
|
|
|
7224
7328
|
onRemove,
|
|
7225
7329
|
className = ""
|
|
7226
7330
|
}) => {
|
|
7227
|
-
const translation = useTranslation(
|
|
7331
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7228
7332
|
const requiredAndNoValue = softRequired && !hasValue;
|
|
7229
7333
|
return /* @__PURE__ */ jsxs32("div", { className: clsx34("row gap-x-0 group", className), children: [
|
|
7230
7334
|
/* @__PURE__ */ jsxs32(
|
|
@@ -7257,7 +7361,7 @@ var PropertyBase = ({
|
|
|
7257
7361
|
color: "negative",
|
|
7258
7362
|
className: clsx34("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
|
|
7259
7363
|
disabled: !hasValue || readOnly,
|
|
7260
|
-
children: translation
|
|
7364
|
+
children: translation("remove")
|
|
7261
7365
|
}
|
|
7262
7366
|
)
|
|
7263
7367
|
]
|
|
@@ -7268,16 +7372,6 @@ var PropertyBase = ({
|
|
|
7268
7372
|
|
|
7269
7373
|
// src/components/properties/CheckboxProperty.tsx
|
|
7270
7374
|
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
7375
|
var CheckboxProperty = ({
|
|
7282
7376
|
overwriteTranslation,
|
|
7283
7377
|
value,
|
|
@@ -7285,7 +7379,7 @@ var CheckboxProperty = ({
|
|
|
7285
7379
|
readOnly,
|
|
7286
7380
|
...baseProps
|
|
7287
7381
|
}) => {
|
|
7288
|
-
const translation = useTranslation(
|
|
7382
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7289
7383
|
return /* @__PURE__ */ jsx47(
|
|
7290
7384
|
PropertyBase,
|
|
7291
7385
|
{
|
|
@@ -7299,7 +7393,7 @@ var CheckboxProperty = ({
|
|
|
7299
7393
|
checked: value ?? true,
|
|
7300
7394
|
disabled: readOnly,
|
|
7301
7395
|
onChange,
|
|
7302
|
-
label: { name: `${translation
|
|
7396
|
+
label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" }
|
|
7303
7397
|
}
|
|
7304
7398
|
) })
|
|
7305
7399
|
}
|
|
@@ -7366,14 +7460,10 @@ import clsx36 from "clsx";
|
|
|
7366
7460
|
import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7367
7461
|
var defaultMultiSelectTranslation = {
|
|
7368
7462
|
en: {
|
|
7369
|
-
|
|
7370
|
-
search: "Search",
|
|
7371
|
-
selected: "selected"
|
|
7463
|
+
selected: `{{amount}} selected`
|
|
7372
7464
|
},
|
|
7373
7465
|
de: {
|
|
7374
|
-
|
|
7375
|
-
search: "Suche",
|
|
7376
|
-
selected: "ausgew\xE4hlt"
|
|
7466
|
+
selected: `{{amount}} ausgew\xE4hlt`
|
|
7377
7467
|
}
|
|
7378
7468
|
};
|
|
7379
7469
|
var MultiSelect = ({
|
|
@@ -7388,7 +7478,7 @@ var MultiSelect = ({
|
|
|
7388
7478
|
useChipDisplay = false,
|
|
7389
7479
|
className = ""
|
|
7390
7480
|
}) => {
|
|
7391
|
-
const translation = useTranslation(defaultMultiSelectTranslation, overwriteTranslation);
|
|
7481
|
+
const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
|
|
7392
7482
|
const triggerRef = useRef8(null);
|
|
7393
7483
|
const menuRef = useRef8(null);
|
|
7394
7484
|
const [isOpen, setIsOpen] = useState21(false);
|
|
@@ -7421,8 +7511,8 @@ var MultiSelect = ({
|
|
|
7421
7511
|
onClick: () => setIsOpen(!isOpen),
|
|
7422
7512
|
disabled: isDisabled,
|
|
7423
7513
|
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
|
|
7514
|
+
!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() } })) }),
|
|
7515
|
+
isShowingHint && /* @__PURE__ */ jsx49("span", { className: "textstyle-description", children: hintText ?? translation("select") }),
|
|
7426
7516
|
isOpen ? /* @__PURE__ */ jsx49(ChevronUp5, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ jsx49(ChevronDown6, { className: "min-w-6" })
|
|
7427
7517
|
]
|
|
7428
7518
|
}
|
|
@@ -7431,7 +7521,7 @@ var MultiSelect = ({
|
|
|
7431
7521
|
"div",
|
|
7432
7522
|
{
|
|
7433
7523
|
ref: menuRef,
|
|
7434
|
-
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-
|
|
7524
|
+
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-lg max-h-[500px] overflow-y-auto p-2",
|
|
7435
7525
|
children: [
|
|
7436
7526
|
/* @__PURE__ */ jsx49(
|
|
7437
7527
|
SearchableList,
|
|
@@ -7472,7 +7562,7 @@ var MultiSelect = ({
|
|
|
7472
7562
|
})));
|
|
7473
7563
|
},
|
|
7474
7564
|
disabled: options.every((value) => value.selected || value.disabled),
|
|
7475
|
-
children: "
|
|
7565
|
+
children: translation("all")
|
|
7476
7566
|
}
|
|
7477
7567
|
),
|
|
7478
7568
|
/* @__PURE__ */ jsx49(
|
|
@@ -7486,7 +7576,7 @@ var MultiSelect = ({
|
|
|
7486
7576
|
selected: false
|
|
7487
7577
|
})));
|
|
7488
7578
|
},
|
|
7489
|
-
children: "
|
|
7579
|
+
children: translation("none")
|
|
7490
7580
|
}
|
|
7491
7581
|
)
|
|
7492
7582
|
] }),
|
|
@@ -7522,14 +7612,6 @@ var MultiSelectUncontrolled = ({
|
|
|
7522
7612
|
|
|
7523
7613
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7524
7614
|
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
7615
|
var MultiSelectProperty = ({
|
|
7534
7616
|
overwriteTranslation,
|
|
7535
7617
|
options,
|
|
@@ -7539,7 +7621,7 @@ var MultiSelectProperty = ({
|
|
|
7539
7621
|
onRemove,
|
|
7540
7622
|
...multiSelectProps
|
|
7541
7623
|
}) => {
|
|
7542
|
-
const translation = useTranslation(
|
|
7624
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7543
7625
|
const hasValue = options.some((value) => value.selected);
|
|
7544
7626
|
return /* @__PURE__ */ jsx50(
|
|
7545
7627
|
PropertyBase,
|
|
@@ -7562,7 +7644,7 @@ var MultiSelectProperty = ({
|
|
|
7562
7644
|
options,
|
|
7563
7645
|
isDisabled: readOnly,
|
|
7564
7646
|
useChipDisplay: true,
|
|
7565
|
-
hintText: `${translation
|
|
7647
|
+
hintText: `${translation("select")}...`
|
|
7566
7648
|
}
|
|
7567
7649
|
)
|
|
7568
7650
|
}
|
|
@@ -7593,7 +7675,7 @@ var NumberProperty = ({
|
|
|
7593
7675
|
suffix,
|
|
7594
7676
|
...baseProps
|
|
7595
7677
|
}) => {
|
|
7596
|
-
const translation = useTranslation(defaultNumberPropertyTranslation, overwriteTranslation);
|
|
7678
|
+
const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
|
|
7597
7679
|
const hasValue = value !== void 0;
|
|
7598
7680
|
return /* @__PURE__ */ jsx51(
|
|
7599
7681
|
PropertyBase,
|
|
@@ -7615,7 +7697,7 @@ var NumberProperty = ({
|
|
|
7615
7697
|
value: value?.toString() ?? "",
|
|
7616
7698
|
type: "number",
|
|
7617
7699
|
readOnly,
|
|
7618
|
-
placeholder: `${translation
|
|
7700
|
+
placeholder: `${translation("value")}...`,
|
|
7619
7701
|
onChangeText: (value2) => {
|
|
7620
7702
|
const numberValue = parseFloat(value2);
|
|
7621
7703
|
if (isNaN(numberValue)) {
|
|
@@ -7646,14 +7728,6 @@ var NumberProperty = ({
|
|
|
7646
7728
|
import { List as List2 } from "lucide-react";
|
|
7647
7729
|
import clsx39 from "clsx";
|
|
7648
7730
|
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
7731
|
var SingleSelectProperty = ({
|
|
7658
7732
|
overwriteTranslation,
|
|
7659
7733
|
value,
|
|
@@ -7664,7 +7738,7 @@ var SingleSelectProperty = ({
|
|
|
7664
7738
|
onRemove,
|
|
7665
7739
|
...selectProps
|
|
7666
7740
|
}) => {
|
|
7667
|
-
const translation = useTranslation(
|
|
7741
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7668
7742
|
const hasValue = value !== void 0;
|
|
7669
7743
|
return /* @__PURE__ */ jsx52(
|
|
7670
7744
|
PropertyBase,
|
|
@@ -7687,7 +7761,7 @@ var SingleSelectProperty = ({
|
|
|
7687
7761
|
options,
|
|
7688
7762
|
isDisabled: readOnly,
|
|
7689
7763
|
className: clsx39("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
|
|
7690
|
-
hintText: `${translation
|
|
7764
|
+
hintText: `${translation("select")}...`
|
|
7691
7765
|
}
|
|
7692
7766
|
)
|
|
7693
7767
|
}
|
|
@@ -7800,10 +7874,10 @@ var TextareaUncontrolled = ({
|
|
|
7800
7874
|
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
7801
7875
|
var defaultTextPropertyTranslation = {
|
|
7802
7876
|
en: {
|
|
7803
|
-
|
|
7877
|
+
text: "Text"
|
|
7804
7878
|
},
|
|
7805
7879
|
de: {
|
|
7806
|
-
|
|
7880
|
+
text: "Text"
|
|
7807
7881
|
}
|
|
7808
7882
|
};
|
|
7809
7883
|
var TextProperty = ({
|
|
@@ -7815,7 +7889,7 @@ var TextProperty = ({
|
|
|
7815
7889
|
onEditComplete = noop,
|
|
7816
7890
|
...baseProps
|
|
7817
7891
|
}) => {
|
|
7818
|
-
const translation = useTranslation(defaultTextPropertyTranslation, overwriteTranslation);
|
|
7892
|
+
const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
|
|
7819
7893
|
const hasValue = value !== void 0;
|
|
7820
7894
|
return /* @__PURE__ */ jsx54(
|
|
7821
7895
|
PropertyBase,
|
|
@@ -7836,7 +7910,7 @@ var TextProperty = ({
|
|
|
7836
7910
|
defaultStyle: false,
|
|
7837
7911
|
value: value ?? "",
|
|
7838
7912
|
readOnly,
|
|
7839
|
-
placeholder: `${translation
|
|
7913
|
+
placeholder: `${translation("text")}...`,
|
|
7840
7914
|
onChangeText: (value2) => {
|
|
7841
7915
|
if (!value2) {
|
|
7842
7916
|
onRemove();
|
|
@@ -7862,46 +7936,6 @@ var TextProperty = ({
|
|
|
7862
7936
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
7863
7937
|
import clsx42 from "clsx";
|
|
7864
7938
|
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
7939
|
var DateTimePicker = ({
|
|
7906
7940
|
overwriteTranslation,
|
|
7907
7941
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -7914,7 +7948,7 @@ var DateTimePicker = ({
|
|
|
7914
7948
|
timePickerProps,
|
|
7915
7949
|
datePickerProps
|
|
7916
7950
|
}) => {
|
|
7917
|
-
const translation = useTranslation(
|
|
7951
|
+
const translation = useTranslation([formTranslation, timeTranslation], overwriteTranslation);
|
|
7918
7952
|
const useDate = mode === "dateTime" || mode === "date";
|
|
7919
7953
|
const useTime = mode === "dateTime" || mode === "time";
|
|
7920
7954
|
let dateDisplay;
|
|
@@ -7951,13 +7985,13 @@ var DateTimePicker = ({
|
|
|
7951
7985
|
timeDisplay
|
|
7952
7986
|
] }),
|
|
7953
7987
|
/* @__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
|
|
7988
|
+
/* @__PURE__ */ jsx55(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
7955
7989
|
/* @__PURE__ */ jsx55(
|
|
7956
7990
|
SolidButton,
|
|
7957
7991
|
{
|
|
7958
7992
|
size: "medium",
|
|
7959
7993
|
onClick: () => onFinish(value),
|
|
7960
|
-
children: translation
|
|
7994
|
+
children: translation("change")
|
|
7961
7995
|
}
|
|
7962
7996
|
)
|
|
7963
7997
|
] }) })
|
|
@@ -8026,7 +8060,7 @@ var Menu = ({
|
|
|
8026
8060
|
ref: menuRef,
|
|
8027
8061
|
onClick: (e) => e.stopPropagation(),
|
|
8028
8062
|
className: clsx43(
|
|
8029
|
-
"absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-
|
|
8063
|
+
"absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-lg z-10",
|
|
8030
8064
|
{
|
|
8031
8065
|
"top-0": alignment[0] === "t",
|
|
8032
8066
|
"bottom-0": alignment[0] === "b",
|
|
@@ -8485,6 +8519,7 @@ export {
|
|
|
8485
8519
|
ToggleableInput,
|
|
8486
8520
|
ToggleableInputUncontrolled,
|
|
8487
8521
|
Tooltip,
|
|
8522
|
+
TranslationPluralCount,
|
|
8488
8523
|
VerticalDivider,
|
|
8489
8524
|
YearMonthPicker,
|
|
8490
8525
|
YearMonthPickerUncontrolled,
|
|
@@ -8504,6 +8539,7 @@ export {
|
|
|
8504
8539
|
equalDate,
|
|
8505
8540
|
equalSizeGroups,
|
|
8506
8541
|
filterNews,
|
|
8542
|
+
formTranslation,
|
|
8507
8543
|
formatDate,
|
|
8508
8544
|
formatDateTime,
|
|
8509
8545
|
generateShadingColors,
|
|
@@ -8514,6 +8550,7 @@ export {
|
|
|
8514
8550
|
isDataObjectSelected,
|
|
8515
8551
|
isInTimeSpan,
|
|
8516
8552
|
localizedNewsSchema,
|
|
8553
|
+
monthTranslation,
|
|
8517
8554
|
monthsList,
|
|
8518
8555
|
newsListSchema,
|
|
8519
8556
|
newsSchema,
|
|
@@ -8523,6 +8560,7 @@ export {
|
|
|
8523
8560
|
removeFromTableSelection,
|
|
8524
8561
|
shadingColorValues,
|
|
8525
8562
|
subtractDuration,
|
|
8563
|
+
timeTranslation,
|
|
8526
8564
|
updatePagination,
|
|
8527
8565
|
useHoverState,
|
|
8528
8566
|
useLanguage,
|