@testgorilla/tgo-ui 1.0.9 → 1.0.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.
Files changed (27) hide show
  1. package/README.md +42 -17
  2. package/components/create-account/create-account.component.d.ts +8 -2
  3. package/components/create-account/create-account.constant.d.ts +2 -0
  4. package/components/create-account/create-account.model.d.ts +2 -0
  5. package/components/navigation/navigation.component.d.ts +7 -1
  6. package/components/snackbar/snackbar.component.d.ts +12 -2
  7. package/components/snackbar/snackbar.component.module.d.ts +4 -1
  8. package/components/spinner/spinner.component.d.ts +1 -1
  9. package/esm2020/components/alert-banner/alert-banner.component.mjs +3 -3
  10. package/esm2020/components/alert-banner/alert-banner.component.module.mjs +1 -2
  11. package/esm2020/components/create-account/create-account.component.mjs +13 -5
  12. package/esm2020/components/create-account/create-account.constant.mjs +5 -3
  13. package/esm2020/components/create-account/create-account.model.mjs +1 -1
  14. package/esm2020/components/navigation/navigation.component.mjs +12 -3
  15. package/esm2020/components/progress-bar/progress-bar.component.mjs +1 -1
  16. package/esm2020/components/snackbar/snackbar.component.mjs +24 -9
  17. package/esm2020/components/snackbar/snackbar.component.module.mjs +28 -6
  18. package/esm2020/components/spinner/spinner.component.mjs +3 -3
  19. package/esm2020/utils/localization/language.service.mjs +78 -0
  20. package/fesm2015/testgorilla-tgo-ui.mjs +153 -28
  21. package/fesm2015/testgorilla-tgo-ui.mjs.map +1 -1
  22. package/fesm2020/testgorilla-tgo-ui.mjs +153 -28
  23. package/fesm2020/testgorilla-tgo-ui.mjs.map +1 -1
  24. package/package.json +4 -1
  25. package/src/assets/i18n/en.json +73 -0
  26. package/src/assets/i18n/es.json +5 -0
  27. package/utils/localization/language.service.d.ts +46 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testgorilla/tgo-ui",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "lint-staged": {
5
5
  "src/**/*.ts": [
6
6
  "eslint --fix",
@@ -27,6 +27,9 @@
27
27
  "@angular/platform-browser": "~15.2.9",
28
28
  "@angular/platform-browser-dynamic": "~15.2.9",
29
29
  "@angular/router": "~15.2.9",
30
+ "@ngneat/transloco": "^4.3.0",
31
+ "@ngneat/transloco-messageformat": "^5.0.0",
32
+ "@ngneat/until-destroy": "^10.0.0",
30
33
  "rxjs": "~7.5.5",
31
34
  "zone.js": "^0.13.1"
32
35
  },
@@ -0,0 +1,73 @@
1
+ {
2
+ "SNACKBAR": {
3
+ "DISMISS": "Dismiss"
4
+ },
5
+ "PLURALS": {
6
+ "EMAILS": "{numEmails, select, 1 {email} other {emails}}",
7
+ "USERS": "{numUsers, select, 1 {User} other {Users}}",
8
+ "TESTS": "{numberTests, select, 1 {test} other {tests}}",
9
+ "QUESTIONS": "{numberQuestions, select, 1 {question} other {questions}}",
10
+ "ITEMS": "{numItems, select, 1 {item} other {items}}",
11
+ "DATE_TIME": {
12
+ "SECONDS": "{seconds, select, 1 {second} other {seconds}}",
13
+ "MINUTES": "{minutes, select, 1 {minute} other {minutes}}",
14
+ "HOURS": "{hours, select, 1 {hour} other {hours}}",
15
+ "DAYS": "{days, select, 1 {day} other {days}}",
16
+ "SHORT_SECONDS": "{seconds, select, 1 {sec} other {secs}}",
17
+ "SHORT_MINUTES": "{minutes, select, 1 {min} other {mins}}"
18
+ },
19
+ "CUSTOM_QUESTIONS": "{numberCustomQuestions, select, 1 {custom question} other {custom questions}}",
20
+ "CANDIDATES": "{numberCandidates, select, 1 {candidate} other {candidates}}",
21
+ "INVITATIONS": "{numberInvitations, select, 1 {invitation} other {invitations}}",
22
+ "ASSESSMENTS": "{numberAssessments, select, 1 {assessment} other {assessments}}"
23
+ },
24
+ "COMMON": {
25
+ "IS_ARE": "{count, select, 1 {is} other {are}}",
26
+ "ORDERING": {
27
+ "GENDER_NEUTRAL": "{index, select, 0 {the first} 1 {the second} 2 {the third} 3 {the fourth} 4 {the fifth} 5 {the sixth} 6 {the seventh} other {the}}",
28
+ "MALE": "{index, select, 0 {the first} 1 {the second} 2 {the third} 3 {the fourth} 4 {the fifth} 5 {the sixth} 6 {the seventh} other {the}}",
29
+ "FEMALE": "{index, select, 0 {the first} 1 {the second} 2 {the third} 3 {the fourth} 4 {the fifth} 5 {the sixth} 6 {the seventh} other {the}}",
30
+ "DE_ACCUSATIVE_MALE": "{index, select, 0 {the first} 1 {the second} 2 {the third} 3 {the fourth} 4 {the fifth} 5 {the sixth} 6 {the seventh} other {the}}",
31
+ "DE_DATIVE_MALE_AND_NEUTRAL": "{index, select, 0 {the first} 1 {the second} 2 {the third} 3 {the fourth} 4 {the fifth} 5 {the sixth} 6 {the seventh} other {the}}",
32
+ "DE_GENTIVE_MALE_AND_NEUTRAL": "{index, select, 0 {the first} 1 {the second} 2 {the third} 3 {the fourth} 4 {the fifth} 5 {the sixth} 6 {the seventh} other {the}}",
33
+ "ORDINAL": "{index, select, 0 {1st} 1 {2nd} 2 {3rd} 3 {4th} 4 {5th} other {nth}}"
34
+ },
35
+ "APPLY": "Apply",
36
+ "VALIDATE": "Validate",
37
+ "YES": "Yes",
38
+ "NO": "No",
39
+ "CONTINUE": "Continue",
40
+ "NEXT": "Next",
41
+ "CLOSE": "Close",
42
+ "THANK_YOU": "Thank you",
43
+ "CANCEL": "Cancel",
44
+ "CONFIRM": "Confirm",
45
+ "SUBMIT": "Submit",
46
+ "EMAIL": "Email",
47
+ "OK": "OK",
48
+ "REMOVE": "Remove",
49
+ "TEST": "test",
50
+ "HAS_HAVE": "{count, select, 1 {has} other {have}}",
51
+ "MAYBE": "Maybe",
52
+ "BACK": "Back",
53
+ "SAVE": "Save",
54
+ "SAVING": "Saving",
55
+ "DELETE": "Delete",
56
+ "SELECT": "Select",
57
+ "SEND": "Send",
58
+ "N/A": "N/A",
59
+ "EDIT": "Edit",
60
+ "SKIP": "Skip",
61
+ "SEARCH": "Search",
62
+ "ROLE": "Role",
63
+ "ALL": "All",
64
+ "OR_DIVIDER": "or"
65
+ },
66
+ "DATE_TIME": {
67
+ "SECONDS": "{{seconds}} {{PLURALS.DATE_TIME.SECONDS}}",
68
+ "SHORT_SECONDS": "{{seconds}} {{PLURALS.DATE_TIME.SHORT_SECONDS}}",
69
+ "SHORT_MINUTES": "{{minutes}} {{PLURALS.DATE_TIME.SHORT_MINUTES}}",
70
+ "HOURS": "{{hours}} {{PLURALS.DATE_TIME.HOURS}}",
71
+ "DAYS": "{{days}} {{PLURALS.DATE_TIME.DAYS}}"
72
+ }
73
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "SNACKBAR": {
3
+ "DISMISS": "Cerrar"
4
+ }
5
+ }
@@ -0,0 +1,46 @@
1
+ import { TranslocoService } from '@ngneat/transloco';
2
+ import * as i0 from "@angular/core";
3
+ export declare enum Language {
4
+ en = "en",
5
+ es = "es",
6
+ nl = "nl",
7
+ fr = "fr",
8
+ de = "de",
9
+ 'it-it' = "it-it",
10
+ 'ja-jp' = "ja-jp",
11
+ 'pt-br' = "pt-br",
12
+ 'da-dk' = "da-dk",
13
+ 'nb-no' = "nb-no",
14
+ 'pl-pl' = "pl-pl",
15
+ 'sv-se' = "sv-se"
16
+ }
17
+ export type TranslationMap = {
18
+ [key in Language]: string;
19
+ };
20
+ export declare const getAvailableLangs: () => Language[];
21
+ export type UILanguage = {
22
+ code: Language | string;
23
+ label: string;
24
+ };
25
+ export declare class LanguageService {
26
+ private translocoService;
27
+ static readonly defaultLanguage = Language.en;
28
+ readonly defaultLanguageList: UILanguage[];
29
+ private languageChangeSubscription;
30
+ constructor(translocoService: TranslocoService);
31
+ /**
32
+ *
33
+ * @description Initialize Language Service.
34
+ * @memberof LanguageService
35
+ */
36
+ init(language: string): void;
37
+ /**
38
+ *
39
+ * @description Set a langauge as active language.
40
+ * @param {string} languageCode Language value code.
41
+ * @memberof LanguageService
42
+ */
43
+ setActiveLanguage(languageCode: string): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<LanguageService, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<LanguageService>;
46
+ }