@magmamath/students-features 0.2.9 → 0.2.11
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/commonjs/features/feedback/components/EmptyComment.js +4 -5
- package/dist/commonjs/features/feedback/components/EmptyComment.js.map +1 -1
- package/dist/commonjs/features/feedback/components/ListCardCommentsCount.js +1 -1
- package/dist/commonjs/features/feedback/components/TeacherFeedback.js +5 -6
- package/dist/commonjs/features/feedback/components/TeacherFeedback.js.map +1 -1
- package/dist/commonjs/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.js +32 -9
- package/dist/commonjs/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.js.map +1 -1
- package/dist/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherComment.js +1 -3
- package/dist/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherComment.js.map +1 -1
- package/dist/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.js +1 -8
- package/dist/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.js.map +1 -1
- package/dist/commonjs/features/feedback/constants.js +11 -3
- package/dist/commonjs/features/feedback/constants.js.map +1 -1
- package/dist/commonjs/features/feedback/helpers.js +24 -0
- package/dist/commonjs/features/feedback/helpers.js.map +1 -1
- package/dist/commonjs/features/feedback/model/api.js.map +1 -1
- package/dist/commonjs/features/feedback/model/comments.js +17 -33
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js +5 -3
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/feedback/types.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js +20 -16
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/lib/localization/en.json +12 -0
- package/dist/commonjs/lib/localization/gb.json +12 -0
- package/dist/commonjs/lib/localization/sw.json +12 -0
- package/dist/commonjs/shared/icons/MessageBubbleIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/XCloseIcon.js.map +1 -0
- package/dist/commonjs/shared/translation/constants.js +1 -42
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/helpers.js.map +1 -1
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/features/feedback/components/EmptyComment.js +5 -6
- package/dist/module/features/feedback/components/EmptyComment.js.map +1 -1
- package/dist/module/features/feedback/components/ListCardCommentsCount.js +1 -1
- package/dist/module/features/feedback/components/ListCardCommentsCount.js.map +1 -1
- package/dist/module/features/feedback/components/TeacherFeedback.js +6 -7
- package/dist/module/features/feedback/components/TeacherFeedback.js.map +1 -1
- package/dist/module/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.js +32 -9
- package/dist/module/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.js.map +1 -1
- package/dist/module/features/feedback/components/TeacherFeedbackComments/TeacherComment.js +1 -3
- package/dist/module/features/feedback/components/TeacherFeedbackComments/TeacherComment.js.map +1 -1
- package/dist/module/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.js +2 -9
- package/dist/module/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.js.map +1 -1
- package/dist/module/features/feedback/constants.js +10 -2
- package/dist/module/features/feedback/constants.js.map +1 -1
- package/dist/module/features/feedback/helpers.js +23 -0
- package/dist/module/features/feedback/helpers.js.map +1 -1
- package/dist/module/features/feedback/model/api.js.map +1 -1
- package/dist/module/features/feedback/model/comments.js +14 -30
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/feedback/model/model.js +6 -4
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/feedback/types.js.map +1 -1
- package/dist/module/lib/helpers/helpers.js +20 -16
- package/dist/module/lib/helpers/helpers.js.map +1 -1
- package/dist/module/lib/localization/en.json +12 -0
- package/dist/module/lib/localization/gb.json +12 -0
- package/dist/module/lib/localization/sw.json +12 -0
- package/dist/module/shared/icons/MessageBubbleIcon.js.map +1 -0
- package/dist/module/shared/icons/XCloseIcon.js.map +1 -0
- package/dist/module/shared/translation/constants.js +0 -41
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/helpers.js.map +1 -1
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/features/feedback/components/EmptyComment.d.ts +1 -6
- package/dist/typescript/commonjs/features/feedback/components/EmptyComment.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedback.d.ts +5 -5
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedback.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherComment.d.ts +2 -4
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherComment.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.d.ts +2 -4
- package/dist/typescript/commonjs/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/constants.d.ts +2 -2
- package/dist/typescript/commonjs/features/feedback/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/helpers.d.ts +10 -1
- package/dist/typescript/commonjs/features/feedback/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/api.d.ts +6 -2
- package/dist/typescript/commonjs/features/feedback/model/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/comments.d.ts +10 -12
- package/dist/typescript/commonjs/features/feedback/model/comments.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts +4 -7
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/types.d.ts +8 -1
- package/dist/typescript/commonjs/features/feedback/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +1 -2
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/MessageBubbleIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/XCloseIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +38 -40
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/components/EmptyComment.d.ts +1 -6
- package/dist/typescript/module/features/feedback/components/EmptyComment.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/components/TeacherFeedback.d.ts +5 -5
- package/dist/typescript/module/features/feedback/components/TeacherFeedback.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/components/TeacherFeedbackComments/TeacherComment.d.ts +2 -4
- package/dist/typescript/module/features/feedback/components/TeacherFeedbackComments/TeacherComment.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.d.ts +2 -4
- package/dist/typescript/module/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/constants.d.ts +2 -2
- package/dist/typescript/module/features/feedback/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/helpers.d.ts +10 -1
- package/dist/typescript/module/features/feedback/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/api.d.ts +6 -2
- package/dist/typescript/module/features/feedback/model/api.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/comments.d.ts +10 -12
- package/dist/typescript/module/features/feedback/model/comments.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/model.d.ts +4 -7
- package/dist/typescript/module/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/types.d.ts +8 -1
- package/dist/typescript/module/features/feedback/types.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts +1 -2
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/MessageBubbleIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/XCloseIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +38 -40
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +4 -1
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/feedback/components/EmptyComment.tsx +5 -8
- package/src/features/feedback/components/ListCardCommentsCount.tsx +1 -1
- package/src/features/feedback/components/TeacherFeedback.tsx +7 -8
- package/src/features/feedback/components/TeacherFeedbackButton/TeacherFeedbackButton.tsx +30 -16
- package/src/features/feedback/components/TeacherFeedbackComments/TeacherComment.tsx +3 -5
- package/src/features/feedback/components/TeacherFeedbackComments/TeacherFeedbackComments.tsx +2 -10
- package/src/features/feedback/constants.ts +12 -3
- package/src/features/feedback/helpers.ts +31 -0
- package/src/features/feedback/model/api.ts +6 -2
- package/src/features/feedback/model/comments.ts +17 -39
- package/src/features/feedback/model/model.ts +8 -11
- package/src/features/feedback/types.ts +7 -1
- package/src/lib/helpers/helpers.ts +24 -16
- package/src/lib/localization/en.json +12 -0
- package/src/lib/localization/gb.json +12 -0
- package/src/lib/localization/sw.json +12 -0
- package/src/shared/translation/constants.ts +0 -42
- package/src/shared/translation/helpers.ts +17 -17
- package/src/shared/translation/types.ts +12 -4
- package/dist/commonjs/features/feedback/assets/icons/MessageBubbleIcon.js.map +0 -1
- package/dist/commonjs/features/feedback/assets/icons/XCloseIcon.js.map +0 -1
- package/dist/module/features/feedback/assets/icons/MessageBubbleIcon.js.map +0 -1
- package/dist/module/features/feedback/assets/icons/XCloseIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/feedback/assets/icons/MessageBubbleIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/feedback/assets/icons/XCloseIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/feedback/assets/icons/MessageBubbleIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/feedback/assets/icons/XCloseIcon.d.ts.map +0 -1
- /package/dist/commonjs/{features/feedback/assets → shared}/icons/MessageBubbleIcon.js +0 -0
- /package/dist/commonjs/{features/feedback/assets → shared}/icons/XCloseIcon.js +0 -0
- /package/dist/module/{features/feedback/assets → shared}/icons/MessageBubbleIcon.js +0 -0
- /package/dist/module/{features/feedback/assets → shared}/icons/XCloseIcon.js +0 -0
- /package/dist/typescript/commonjs/{features/feedback/assets → shared}/icons/MessageBubbleIcon.d.ts +0 -0
- /package/dist/typescript/commonjs/{features/feedback/assets → shared}/icons/XCloseIcon.d.ts +0 -0
- /package/dist/typescript/module/{features/feedback/assets → shared}/icons/MessageBubbleIcon.d.ts +0 -0
- /package/dist/typescript/module/{features/feedback/assets → shared}/icons/XCloseIcon.d.ts +0 -0
- /package/src/{features/feedback/assets → shared}/icons/MessageBubbleIcon.tsx +0 -0
- /package/src/{features/feedback/assets → shared}/icons/XCloseIcon.tsx +0 -0
|
@@ -1,28 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Locale } from '@magmamath/students-features'
|
|
1
|
+
import { getText } from '../../shared/translation/helpers'
|
|
3
2
|
|
|
4
3
|
export const generateRandomId = () =>
|
|
5
4
|
Date.now().toString(36) + Math.random().toString(36).substring(2)
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const getYears = (days: number) => Math.floor(days / 365)
|
|
7
|
+
const getMonths = (days: number) => Math.floor(days / 30)
|
|
8
|
+
const getDays = (hours: number) => Math.floor(hours / 24)
|
|
9
|
+
const getHours = (minutes: number) => Math.floor(minutes / 60)
|
|
10
|
+
const getMinutes = (seconds: number) => Math.floor(seconds / 60)
|
|
11
|
+
const getSeconds = (milliseconds: number) => Math.floor(milliseconds / 1000)
|
|
12
|
+
|
|
13
|
+
export const getRelativeTimeText = (date: Date) => {
|
|
9
14
|
const timeBufferMs = 2000 // adds 2 seconds time buffer because when used with sockets, it displayed -1 seconds ago, instead of 1 second ago.
|
|
10
15
|
|
|
11
16
|
const now = new Date().getTime()
|
|
12
17
|
const targetDate = new Date(date).getTime() - timeBufferMs
|
|
13
18
|
const diffTime = now - targetDate
|
|
14
19
|
|
|
15
|
-
const seconds =
|
|
16
|
-
const minutes =
|
|
17
|
-
const hours =
|
|
18
|
-
const days =
|
|
19
|
-
const months =
|
|
20
|
-
const years =
|
|
20
|
+
const seconds = getSeconds(diffTime)
|
|
21
|
+
const minutes = getMinutes(seconds)
|
|
22
|
+
const hours = getHours(minutes)
|
|
23
|
+
const days = getDays(hours)
|
|
24
|
+
const months = getMonths(days)
|
|
25
|
+
const years = getYears(days)
|
|
21
26
|
|
|
22
|
-
if (seconds < 60) return
|
|
23
|
-
if (minutes < 60)
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
return `${
|
|
27
|
+
if (seconds < 60) return getText('time.justNow')
|
|
28
|
+
if (minutes < 60)
|
|
29
|
+
return `${minutes} ${minutes === 1 ? getText('time.minuteAgo') : getText('time.minutesAgo')}`
|
|
30
|
+
if (hours < 24)
|
|
31
|
+
return `${hours} ${hours === 1 ? getText('time.hourAgo') : getText('time.hoursAgo')}`
|
|
32
|
+
if (days < 30) return `${days} ${days === 1 ? getText('time.dayAgo') : getText('time.daysAgo')}`
|
|
33
|
+
if (months < 12)
|
|
34
|
+
return `${months} ${months === 1 ? getText('time.monthAgo') : getText('time.monthsAgo')}`
|
|
35
|
+
return `${years} ${years === 1 ? getText('time.yearAgo') : getText('time.yearsAgo')}`
|
|
28
36
|
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"teacherFeedback.noComments": "No comments yet",
|
|
3
|
+
"time.justNow": "just now",
|
|
4
|
+
"time.minuteAgo": "minute ago",
|
|
5
|
+
"time.minutesAgo": "minutes ago",
|
|
6
|
+
"time.hourAgo": "hour ago",
|
|
7
|
+
"time.hoursAgo": "hours ago",
|
|
8
|
+
"time.dayAgo": "day ago",
|
|
9
|
+
"time.daysAgo": "days ago",
|
|
10
|
+
"time.monthAgo": "month ago",
|
|
11
|
+
"time.monthsAgo": "months ago",
|
|
12
|
+
"time.yearAgo": "year ago",
|
|
13
|
+
"time.yearsAgo": "years ago"
|
|
2
14
|
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"teacherFeedback.noComments": "No comments yet",
|
|
3
|
+
"time.justNow": "just now",
|
|
4
|
+
"time.minuteAgo": "minute ago",
|
|
5
|
+
"time.minutesAgo": "minutes ago",
|
|
6
|
+
"time.hourAgo": "hour ago",
|
|
7
|
+
"time.hoursAgo": "hours ago",
|
|
8
|
+
"time.dayAgo": "day ago",
|
|
9
|
+
"time.daysAgo": "days ago",
|
|
10
|
+
"time.monthAgo": "month ago",
|
|
11
|
+
"time.monthsAgo": "months ago",
|
|
12
|
+
"time.yearAgo": "year ago",
|
|
13
|
+
"time.yearsAgo": "years ago"
|
|
2
14
|
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"teacherFeedback.noComments": "Inga kommentarer än",
|
|
3
|
+
"time.justNow": "alldeles nyss",
|
|
4
|
+
"time.minuteAgo": "minut sedan",
|
|
5
|
+
"time.minutesAgo": "minuter sedan",
|
|
6
|
+
"time.hourAgo": "timme sedan",
|
|
7
|
+
"time.hoursAgo": "timmar sedan",
|
|
8
|
+
"time.dayAgo": "dag sedan",
|
|
9
|
+
"time.daysAgo": "dagar sedan",
|
|
10
|
+
"time.monthAgo": "månad sedan",
|
|
11
|
+
"time.monthsAgo": "månader sedan",
|
|
12
|
+
"time.yearAgo": "år sedan",
|
|
13
|
+
"time.yearsAgo": "år sedan"
|
|
2
14
|
}
|
|
@@ -8,45 +8,3 @@ export const LOCALIZATION_CONFIGS = {
|
|
|
8
8
|
[Locale.GB]: GB,
|
|
9
9
|
[Locale.SW]: SW,
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
export const RELATIVE_TIME_LABELS = {
|
|
13
|
-
[Locale.EN]: {
|
|
14
|
-
justNow: 'just now',
|
|
15
|
-
minuteAgo: 'minute ago',
|
|
16
|
-
minutesAgo: 'minutes ago',
|
|
17
|
-
hourAgo: 'hour ago',
|
|
18
|
-
hoursAgo: 'hours ago',
|
|
19
|
-
dayAgo: 'day ago',
|
|
20
|
-
daysAgo: 'days ago',
|
|
21
|
-
monthAgo: 'month ago',
|
|
22
|
-
monthsAgo: 'months ago',
|
|
23
|
-
yearAgo: 'year ago',
|
|
24
|
-
yearsAgo: 'years ago',
|
|
25
|
-
},
|
|
26
|
-
[Locale.SW]: {
|
|
27
|
-
justNow: 'alldeles nyss',
|
|
28
|
-
minuteAgo: 'minut sedan',
|
|
29
|
-
minutesAgo: 'minuter sedan',
|
|
30
|
-
hourAgo: 'timme sedan',
|
|
31
|
-
hoursAgo: 'timmar sedan',
|
|
32
|
-
dayAgo: 'dag sedan',
|
|
33
|
-
daysAgo: 'dagar sedan',
|
|
34
|
-
monthAgo: 'månad sedan',
|
|
35
|
-
monthsAgo: 'månader sedan',
|
|
36
|
-
yearAgo: 'år sedan',
|
|
37
|
-
yearsAgo: 'år sedan',
|
|
38
|
-
},
|
|
39
|
-
[Locale.GB]: {
|
|
40
|
-
justNow: 'just now',
|
|
41
|
-
minuteAgo: 'minute ago',
|
|
42
|
-
minutesAgo: 'minutes ago',
|
|
43
|
-
hourAgo: 'hour ago',
|
|
44
|
-
hoursAgo: 'hours ago',
|
|
45
|
-
dayAgo: 'day ago',
|
|
46
|
-
daysAgo: 'days ago',
|
|
47
|
-
monthAgo: 'month ago',
|
|
48
|
-
monthsAgo: 'months ago',
|
|
49
|
-
yearAgo: 'year ago',
|
|
50
|
-
yearsAgo: 'years ago',
|
|
51
|
-
},
|
|
52
|
-
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { LOCALIZATION_CONFIGS } from './constants'
|
|
2
2
|
import { $localization, setLocalization } from './model'
|
|
3
|
-
import { GetText, LocalizationConfig } from './types'
|
|
3
|
+
import { GetText, LocalizationConfig, TranslationKeys } from './types'
|
|
4
4
|
|
|
5
5
|
export const getSubstitutedString = (str: string, substitutions: Record<string, string> = {}) => {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const substitutionsArray = Object.entries(substitutions)
|
|
7
|
+
let result = str
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
if (!substitutionsArray.length) return result
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
substitutionsArray.forEach(([key, value]) => {
|
|
12
|
+
result = result.replace(`{{${key}}}`, value)
|
|
13
|
+
})
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
return result
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export const getText: GetText = (key, args = null) => {
|
|
19
|
-
|
|
18
|
+
export const getText: GetText = (key: TranslationKeys, args = null) => {
|
|
19
|
+
const config = $localization.getState()
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const translation = config?.[key]
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (translation && args) {
|
|
24
|
+
return getSubstitutedString(translation, args)
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
return translation ?? key
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export const setFeaturesLocalization = (
|
|
31
|
-
|
|
31
|
+
generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig,
|
|
32
32
|
) => {
|
|
33
|
-
|
|
33
|
+
setLocalization(generator)
|
|
34
34
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import enTranslations from '../../lib/localization/en.json'
|
|
2
|
+
|
|
3
|
+
export type Translations = typeof enTranslations
|
|
4
|
+
export type TranslationKeys = keyof Translations
|
|
5
|
+
|
|
6
|
+
export type GetText = <T extends TranslationKeys>(
|
|
7
|
+
key: T,
|
|
8
|
+
args?: Record<string, string> | null,
|
|
9
|
+
) => Translations[T]
|
|
2
10
|
|
|
3
11
|
export enum Locale {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
12
|
+
EN = 'en-SE',
|
|
13
|
+
SW = 'sv-SE',
|
|
14
|
+
GB = 'en-GB',
|
|
7
15
|
}
|
|
8
16
|
|
|
9
17
|
export type LocalizationConfig = Record<string, string>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_interopRequireWildcard","_reactNativeUi","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MessageBubbleIcon","size","color","COLORS","NEUTRAL_1","jsx","width","height","viewBox","fill","children","Path","d","stroke","strokeWidth","strokeLinejoin","exports"],"sourceRoot":"../../../../../../src","sources":["features/feedback/assets/icons/MessageBubbleIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA8D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAA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EAAEN,IAAK;IAACO,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAC7D,IAAA/B,WAAA,CAAA0B,GAAA,EAAC7B,eAAA,CAAAmC,IAAI;MACHC,CAAC,EAAC,+SAA+S;MACjTC,MAAM,EAAEX,KAAM;MACdY,WAAW,EAAC,GAAG;MACfC,cAAc,EAAC;IAAO,CACvB;EAAC,CACC,CAAC;AAEV,CAAC;AAAAC,OAAA,CAAAhB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_interopRequireWildcard","_reactNativeUi","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","XCloseIcon","size","color","COLORS","NEUTRAL_9","jsx","width","height","viewBox","fill","children","Path","d","exports"],"sourceRoot":"../../../../../../src","sources":["features/feedback/assets/icons/XCloseIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA8D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAA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AC;AAAAW,OAAA,CAAAb,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Svg","Path","COLORS","jsx","_jsx","MessageBubbleIcon","size","color","NEUTRAL_1","width","height","viewBox","fill","children","d","stroke","strokeWidth","strokeLinejoin"],"sourceRoot":"../../../../../../src","sources":["features/feedback/assets/icons/MessageBubbleIcon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAAoBC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE9D,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAGL,MAAM,CAACM;AAAqB,CAAC,KAAK;EACvF,oBACEJ,IAAA,CAACJ,GAAG;IAACS,KAAK,EAAEH,IAAK;IAACI,MAAM,EAAEJ,IAAK;IAACK,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAC7DT,IAAA,CAACH,IAAI;MACHa,CAAC,EAAC,+SAA+S;MACjTC,MAAM,EAAER,KAAM;MACdS,WAAW,EAAC,GAAG;MACfC,cAAc,EAAC;IAAO,CACvB;EAAC,CACC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Svg","Path","COLORS","jsx","_jsx","XCloseIcon","size","color","NEUTRAL_9","width","height","viewBox","fill","children","d"],"sourceRoot":"../../../../../../src","sources":["features/feedback/assets/icons/XCloseIcon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,SAAoBC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE9D,OAAO,MAAMC,UAAU,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAGL,MAAM,CAACM;AAAqB,CAAC,KAAK;EAChF,oBACEJ,IAAA,CAACJ,GAAG;IAACS,KAAK,EAAEH,IAAK;IAACI,MAAM,EAAEJ,IAAK;IAACK,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAC7DT,IAAA,CAACH,IAAI;MACHa,CAAC,EAAC,ufAAuf;MACzfF,IAAI,EAAEL;IAAM,CACb;EAAC,CACC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubbleIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/feedback/assets/icons/MessageBubbleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAU,MAAM,4BAA4B,CAAA;AAE9D,eAAO,MAAM,iBAAiB,oBAA6C,SAAS,sBAWnF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XCloseIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/feedback/assets/icons/XCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAU,MAAM,4BAA4B,CAAA;AAE9D,eAAO,MAAM,UAAU,oBAA6C,SAAS,sBAS5E,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubbleIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/feedback/assets/icons/MessageBubbleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAU,MAAM,4BAA4B,CAAA;AAE9D,eAAO,MAAM,iBAAiB,oBAA6C,SAAS,sBAWnF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XCloseIcon.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/feedback/assets/icons/XCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAU,MAAM,4BAA4B,CAAA;AAE9D,eAAO,MAAM,UAAU,oBAA6C,SAAS,sBAS5E,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/typescript/commonjs/{features/feedback/assets → shared}/icons/MessageBubbleIcon.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/typescript/module/{features/feedback/assets → shared}/icons/MessageBubbleIcon.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|