@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
|
@@ -2,30 +2,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { PropsForTranslation } from '../../localization/useTranslation.mjs';
|
|
3
3
|
import { TimePickerProps } from '../date/TimePicker.mjs';
|
|
4
4
|
import { DatePickerProps } from '../date/DatePicker.mjs';
|
|
5
|
+
import { FormTranslationType } from '../../localization/defaults/form.mjs';
|
|
6
|
+
import { TimeTranslationType } from '../../localization/defaults/time.mjs';
|
|
5
7
|
import '../../localization/util.mjs';
|
|
6
8
|
import '../date/YearMonthPicker.mjs';
|
|
7
9
|
import '../date/DayPicker.mjs';
|
|
8
10
|
import '../../util/date.mjs';
|
|
9
11
|
|
|
10
|
-
type
|
|
11
|
-
clear: string;
|
|
12
|
-
change: string;
|
|
13
|
-
year: string;
|
|
14
|
-
month: string;
|
|
15
|
-
day: string;
|
|
16
|
-
january: string;
|
|
17
|
-
february: string;
|
|
18
|
-
march: string;
|
|
19
|
-
april: string;
|
|
20
|
-
may: string;
|
|
21
|
-
june: string;
|
|
22
|
-
july: string;
|
|
23
|
-
august: string;
|
|
24
|
-
september: string;
|
|
25
|
-
october: string;
|
|
26
|
-
november: string;
|
|
27
|
-
december: string;
|
|
28
|
-
};
|
|
12
|
+
type DateAndTimePickerTranslationType = FormTranslationType & TimeTranslationType;
|
|
29
13
|
type DateTimePickerMode = 'date' | 'time' | 'dateTime';
|
|
30
14
|
type DateTimePickerProps = {
|
|
31
15
|
mode?: DateTimePickerMode;
|
|
@@ -41,6 +25,6 @@ type DateTimePickerProps = {
|
|
|
41
25
|
/**
|
|
42
26
|
* A Component for picking a Date and Time
|
|
43
27
|
*/
|
|
44
|
-
declare const DateTimePicker: ({ overwriteTranslation, value, start, end, mode, onFinish, onChange, onRemove, timePickerProps, datePickerProps, }: PropsForTranslation<
|
|
28
|
+
declare const DateTimePicker: ({ overwriteTranslation, value, start, end, mode, onFinish, onChange, onRemove, timePickerProps, datePickerProps, }: PropsForTranslation<DateAndTimePickerTranslationType, DateTimePickerProps>) => react_jsx_runtime.JSX.Element;
|
|
45
29
|
|
|
46
30
|
export { DateTimePicker, type DateTimePickerMode, type DateTimePickerProps };
|
|
@@ -2,30 +2,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { PropsForTranslation } from '../../localization/useTranslation.js';
|
|
3
3
|
import { TimePickerProps } from '../date/TimePicker.js';
|
|
4
4
|
import { DatePickerProps } from '../date/DatePicker.js';
|
|
5
|
+
import { FormTranslationType } from '../../localization/defaults/form.js';
|
|
6
|
+
import { TimeTranslationType } from '../../localization/defaults/time.js';
|
|
5
7
|
import '../../localization/util.js';
|
|
6
8
|
import '../date/YearMonthPicker.js';
|
|
7
9
|
import '../date/DayPicker.js';
|
|
8
10
|
import '../../util/date.js';
|
|
9
11
|
|
|
10
|
-
type
|
|
11
|
-
clear: string;
|
|
12
|
-
change: string;
|
|
13
|
-
year: string;
|
|
14
|
-
month: string;
|
|
15
|
-
day: string;
|
|
16
|
-
january: string;
|
|
17
|
-
february: string;
|
|
18
|
-
march: string;
|
|
19
|
-
april: string;
|
|
20
|
-
may: string;
|
|
21
|
-
june: string;
|
|
22
|
-
july: string;
|
|
23
|
-
august: string;
|
|
24
|
-
september: string;
|
|
25
|
-
october: string;
|
|
26
|
-
november: string;
|
|
27
|
-
december: string;
|
|
28
|
-
};
|
|
12
|
+
type DateAndTimePickerTranslationType = FormTranslationType & TimeTranslationType;
|
|
29
13
|
type DateTimePickerMode = 'date' | 'time' | 'dateTime';
|
|
30
14
|
type DateTimePickerProps = {
|
|
31
15
|
mode?: DateTimePickerMode;
|
|
@@ -41,6 +25,6 @@ type DateTimePickerProps = {
|
|
|
41
25
|
/**
|
|
42
26
|
* A Component for picking a Date and Time
|
|
43
27
|
*/
|
|
44
|
-
declare const DateTimePicker: ({ overwriteTranslation, value, start, end, mode, onFinish, onChange, onRemove, timePickerProps, datePickerProps, }: PropsForTranslation<
|
|
28
|
+
declare const DateTimePicker: ({ overwriteTranslation, value, start, end, mode, onFinish, onChange, onRemove, timePickerProps, datePickerProps, }: PropsForTranslation<DateAndTimePickerTranslationType, DateTimePickerProps>) => react_jsx_runtime.JSX.Element;
|
|
45
29
|
|
|
46
30
|
export { DateTimePicker, type DateTimePickerMode, type DateTimePickerProps };
|
|
@@ -70,15 +70,55 @@ var useLocale = (overWriteLanguage) => {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// src/localization/useTranslation.ts
|
|
73
|
-
var useTranslation = (
|
|
74
|
-
const { language: languageProp, translation: overwrite } =
|
|
73
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
74
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
75
75
|
const { language: inferredLanguage } = useLanguage();
|
|
76
76
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
77
|
-
|
|
78
|
-
if (overwrite
|
|
79
|
-
|
|
77
|
+
const usedTranslations = [...translations];
|
|
78
|
+
if (overwrite) {
|
|
79
|
+
usedTranslations.push(overwrite);
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return (key, options) => {
|
|
82
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
83
|
+
try {
|
|
84
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
85
|
+
const translation = translations[i];
|
|
86
|
+
const localizedTranslation = translation[usedLanguage];
|
|
87
|
+
if (!localizedTranslation) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const value = localizedTranslation[key];
|
|
91
|
+
if (!value) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
let forProcessing;
|
|
95
|
+
if (typeof value !== "string") {
|
|
96
|
+
if (count <= 0 && value?.zero) {
|
|
97
|
+
forProcessing = value.zero;
|
|
98
|
+
} else if (count === 1 && value?.one) {
|
|
99
|
+
forProcessing = value.one;
|
|
100
|
+
} else if (count === 2 && value?.two) {
|
|
101
|
+
forProcessing = value.two;
|
|
102
|
+
} else if (count <= 10 && value?.few) {
|
|
103
|
+
forProcessing = value.few;
|
|
104
|
+
} else if (count > 10 && value?.many) {
|
|
105
|
+
forProcessing = value.many;
|
|
106
|
+
} else {
|
|
107
|
+
forProcessing = value.other;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
forProcessing = value;
|
|
111
|
+
}
|
|
112
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
113
|
+
return replacements[placeholder] ?? `{{${placeholder}}}`;
|
|
114
|
+
});
|
|
115
|
+
return forProcessing;
|
|
116
|
+
}
|
|
117
|
+
} catch (e) {
|
|
118
|
+
console.error(e);
|
|
119
|
+
}
|
|
120
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
121
|
+
};
|
|
82
122
|
};
|
|
83
123
|
|
|
84
124
|
// src/util/noop.ts
|
|
@@ -670,16 +710,80 @@ var DayPicker = ({
|
|
|
670
710
|
] });
|
|
671
711
|
};
|
|
672
712
|
|
|
673
|
-
// src/
|
|
674
|
-
var
|
|
675
|
-
var defaultDatePickerTranslation = {
|
|
713
|
+
// src/localization/defaults/time.ts
|
|
714
|
+
var monthTranslation = {
|
|
676
715
|
en: {
|
|
677
|
-
|
|
716
|
+
january: "January",
|
|
717
|
+
february: "Febuary",
|
|
718
|
+
march: "March",
|
|
719
|
+
april: "April",
|
|
720
|
+
may: "May",
|
|
721
|
+
june: "June",
|
|
722
|
+
july: "July",
|
|
723
|
+
august: "August",
|
|
724
|
+
september: "September",
|
|
725
|
+
october: "October",
|
|
726
|
+
november: "November",
|
|
727
|
+
december: "December"
|
|
678
728
|
},
|
|
679
729
|
de: {
|
|
680
|
-
|
|
730
|
+
january: "Januar",
|
|
731
|
+
february: "Febuar",
|
|
732
|
+
march: "M\xE4rz",
|
|
733
|
+
april: "April",
|
|
734
|
+
may: "Mai",
|
|
735
|
+
june: "Juni",
|
|
736
|
+
july: "Juli",
|
|
737
|
+
august: "August",
|
|
738
|
+
september: "September",
|
|
739
|
+
october: "October",
|
|
740
|
+
november: "November",
|
|
741
|
+
december: "December"
|
|
681
742
|
}
|
|
682
743
|
};
|
|
744
|
+
var timeTranslation = {
|
|
745
|
+
en: {
|
|
746
|
+
...monthTranslation.en,
|
|
747
|
+
century: { one: "Century", other: "Centuries" },
|
|
748
|
+
decade: { one: "Decade", other: "Decades" },
|
|
749
|
+
year: { one: "Year", other: "Years" },
|
|
750
|
+
month: { one: "Month", other: "Months" },
|
|
751
|
+
day: { one: "Day", other: "Days" },
|
|
752
|
+
hour: { one: "Hour", other: "Hours" },
|
|
753
|
+
minute: { one: "Minute", other: "Minutes" },
|
|
754
|
+
second: { one: "Second", other: "Seconds" },
|
|
755
|
+
millisecond: { one: "Millisecond", other: "Milliseconds" },
|
|
756
|
+
microsecond: { one: "Microsecond", other: "Microseconds" },
|
|
757
|
+
nanosecond: { one: "Nanosecond", other: "Nanoseconds" },
|
|
758
|
+
yesterday: "Yesterday",
|
|
759
|
+
today: "Today",
|
|
760
|
+
tomorrow: "Tomorrow",
|
|
761
|
+
in: "in",
|
|
762
|
+
ago: "ago"
|
|
763
|
+
},
|
|
764
|
+
de: {
|
|
765
|
+
...monthTranslation.de,
|
|
766
|
+
century: { one: "Jahrhundert", other: "Jahrhunderte" },
|
|
767
|
+
decade: { one: "Jahrzehnt", other: "Jahrzehnte" },
|
|
768
|
+
year: { one: "Jahr", other: "Jahre" },
|
|
769
|
+
month: { one: "Monat", other: "Monate" },
|
|
770
|
+
day: { one: "Tag", other: "Tage" },
|
|
771
|
+
hour: { one: "Stunde", other: "Stunden" },
|
|
772
|
+
minute: { one: "Minute", other: "Minuten" },
|
|
773
|
+
second: { one: "Sekunde", other: "Sekunden" },
|
|
774
|
+
millisecond: { one: "Millisekunde", other: "Millisekunden" },
|
|
775
|
+
microsecond: { one: "Mikrosekunde", other: "Mikrosekunden" },
|
|
776
|
+
nanosecond: { one: "Nanosekunde", other: "Nanosekunden" },
|
|
777
|
+
yesterday: "Gestern",
|
|
778
|
+
today: "Heute",
|
|
779
|
+
tomorrow: "Morgen",
|
|
780
|
+
in: "in",
|
|
781
|
+
ago: "vor"
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
// src/components/date/DatePicker.tsx
|
|
786
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
683
787
|
var DatePicker = ({
|
|
684
788
|
overwriteTranslation,
|
|
685
789
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -692,7 +796,7 @@ var DatePicker = ({
|
|
|
692
796
|
className = ""
|
|
693
797
|
}) => {
|
|
694
798
|
const locale = useLocale();
|
|
695
|
-
const translation = useTranslation(
|
|
799
|
+
const translation = useTranslation([timeTranslation], overwriteTranslation);
|
|
696
800
|
const [displayedMonth, setDisplayedMonth] = (0, import_react7.useState)(value);
|
|
697
801
|
const [displayMode, setDisplayMode] = (0, import_react7.useState)(initialDisplay);
|
|
698
802
|
(0, import_react7.useEffect)(() => {
|
|
@@ -775,55 +879,115 @@ var DatePicker = ({
|
|
|
775
879
|
newDate.setHours(value.getHours(), value.getMinutes());
|
|
776
880
|
onChange(newDate);
|
|
777
881
|
},
|
|
778
|
-
children: translation
|
|
882
|
+
children: translation("today")
|
|
779
883
|
}
|
|
780
884
|
) })
|
|
781
885
|
] })
|
|
782
886
|
] });
|
|
783
887
|
};
|
|
784
888
|
|
|
785
|
-
// src/
|
|
786
|
-
var
|
|
787
|
-
var defaultTimeTranslation = {
|
|
889
|
+
// src/localization/defaults/form.ts
|
|
890
|
+
var formTranslation = {
|
|
788
891
|
en: {
|
|
789
|
-
|
|
892
|
+
all: "All",
|
|
893
|
+
back: "Back",
|
|
894
|
+
cancel: "Cancel",
|
|
790
895
|
change: "Change",
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
896
|
+
clear: "Clear",
|
|
897
|
+
close: "Close",
|
|
898
|
+
confirm: "Confirm",
|
|
899
|
+
decline: "Decline",
|
|
900
|
+
delete: "Delete",
|
|
901
|
+
discard: "Discard",
|
|
902
|
+
discardChanges: "Discard Changes",
|
|
903
|
+
done: "Done",
|
|
904
|
+
edit: "Edit",
|
|
905
|
+
enterText: "Enter text here",
|
|
906
|
+
error: "Error",
|
|
907
|
+
exit: "Exit",
|
|
908
|
+
fieldRequiredError: "This field is required.",
|
|
909
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
910
|
+
less: "Less",
|
|
911
|
+
loading: "Loading",
|
|
912
|
+
maxLengthError: "Maximum length exceeded.",
|
|
913
|
+
minLengthError: "Minimum length not met.",
|
|
914
|
+
more: "More",
|
|
915
|
+
next: "Next",
|
|
916
|
+
no: "No",
|
|
917
|
+
none: "None",
|
|
918
|
+
of: "of",
|
|
919
|
+
optional: "Optional",
|
|
920
|
+
pleaseWait: "Please wait...",
|
|
921
|
+
previous: "Previous",
|
|
922
|
+
remove: "Remove",
|
|
923
|
+
required: "Required",
|
|
924
|
+
reset: "Reset",
|
|
925
|
+
save: "Save",
|
|
926
|
+
search: "Search",
|
|
927
|
+
select: "Select",
|
|
928
|
+
selectOption: "Select an option",
|
|
929
|
+
show: "Show",
|
|
930
|
+
showMore: "Show more",
|
|
931
|
+
showLess: "Show less",
|
|
932
|
+
submit: "Submit",
|
|
933
|
+
success: "Success",
|
|
934
|
+
update: "Update",
|
|
935
|
+
unsavedChanges: "Unsaved Changes",
|
|
936
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
937
|
+
yes: "Yes"
|
|
806
938
|
},
|
|
807
939
|
de: {
|
|
808
|
-
|
|
940
|
+
all: "Alle",
|
|
941
|
+
back: "Zur\xFCck",
|
|
942
|
+
cancel: "Abbrechen",
|
|
809
943
|
change: "\xC4ndern",
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
944
|
+
clear: "L\xF6schen",
|
|
945
|
+
close: "Schlie\xDFen",
|
|
946
|
+
confirm: "Best\xE4tigen",
|
|
947
|
+
decline: "Ablehnen",
|
|
948
|
+
delete: "L\xF6schen",
|
|
949
|
+
discard: "Verwerfen",
|
|
950
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
951
|
+
done: "Fertig",
|
|
952
|
+
edit: "Bearbeiten",
|
|
953
|
+
enterText: "Text hier eingeben",
|
|
954
|
+
error: "Fehler",
|
|
955
|
+
exit: "Beenden",
|
|
956
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
957
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
958
|
+
less: "Weniger",
|
|
959
|
+
loading: "L\xE4dt",
|
|
960
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
961
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
962
|
+
more: "Mehr",
|
|
963
|
+
next: "Weiter",
|
|
964
|
+
no: "Nein",
|
|
965
|
+
none: "Nichts",
|
|
966
|
+
of: "von",
|
|
967
|
+
optional: "Optional",
|
|
968
|
+
pleaseWait: "Bitte warten...",
|
|
969
|
+
previous: "Vorherige",
|
|
970
|
+
remove: "Entfernen",
|
|
971
|
+
required: "Erforderlich",
|
|
972
|
+
reset: "Zur\xFCcksetzen",
|
|
973
|
+
save: "Speichern",
|
|
974
|
+
search: "Suche",
|
|
975
|
+
select: "Select",
|
|
976
|
+
selectOption: "Option ausw\xE4hlen",
|
|
977
|
+
show: "Anzeigen",
|
|
978
|
+
showMore: "Mehr anzeigen",
|
|
979
|
+
showLess: "Weniger anzeigen",
|
|
980
|
+
submit: "Abschicken",
|
|
981
|
+
success: "Erfolg",
|
|
982
|
+
update: "Update",
|
|
983
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
984
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
985
|
+
yes: "Ja"
|
|
825
986
|
}
|
|
826
987
|
};
|
|
988
|
+
|
|
989
|
+
// src/components/user-action/DateAndTimePicker.tsx
|
|
990
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
827
991
|
var DateTimePicker = ({
|
|
828
992
|
overwriteTranslation,
|
|
829
993
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -836,7 +1000,7 @@ var DateTimePicker = ({
|
|
|
836
1000
|
timePickerProps,
|
|
837
1001
|
datePickerProps
|
|
838
1002
|
}) => {
|
|
839
|
-
const translation = useTranslation(
|
|
1003
|
+
const translation = useTranslation([formTranslation, timeTranslation], overwriteTranslation);
|
|
840
1004
|
const useDate = mode === "dateTime" || mode === "date";
|
|
841
1005
|
const useTime = mode === "dateTime" || mode === "time";
|
|
842
1006
|
let dateDisplay;
|
|
@@ -873,13 +1037,13 @@ var DateTimePicker = ({
|
|
|
873
1037
|
timeDisplay
|
|
874
1038
|
] }),
|
|
875
1039
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "row justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "row gap-x-2 mt-1", children: [
|
|
876
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
877
1041
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
878
1042
|
SolidButton,
|
|
879
1043
|
{
|
|
880
1044
|
size: "medium",
|
|
881
1045
|
onClick: () => onFinish(value),
|
|
882
|
-
children: translation
|
|
1046
|
+
children: translation("change")
|
|
883
1047
|
}
|
|
884
1048
|
)
|
|
885
1049
|
] }) })
|