@everymatrix/user-transaction-history 1.44.0 → 1.45.0

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 (65) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-4699d9a2.js +1382 -0
  3. package/dist/cjs/loader.cjs.js +7 -13
  4. package/dist/cjs/user-transaction-history.cjs.entry.js +291 -295
  5. package/dist/cjs/user-transaction-history.cjs.js +17 -11
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/internal/filters.js +11 -20
  8. package/dist/collection/components/internal/loader.js +2 -14
  9. package/dist/collection/components/internal/page-size.js +3 -5
  10. package/dist/collection/components/internal/table.js +18 -29
  11. package/dist/collection/components/internal/transaction.js +4 -14
  12. package/dist/collection/components/user-transaction-history/index.js +1 -0
  13. package/dist/collection/components/user-transaction-history/user-transaction-history.js +334 -343
  14. package/dist/collection/global/app.js +1 -1
  15. package/dist/collection/utils/currency.utils.js +15 -15
  16. package/dist/collection/utils/date.util.js +6 -6
  17. package/dist/collection/utils/locale.util.js +60 -60
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/esm/app-globals-0f993ce5.js +3 -0
  20. package/dist/esm/index-b111cb50.js +1353 -0
  21. package/dist/esm/loader.js +7 -13
  22. package/dist/esm/user-transaction-history.entry.js +291 -295
  23. package/dist/esm/user-transaction-history.js +14 -11
  24. package/dist/stencil.config.dev.js +17 -0
  25. package/dist/stencil.config.js +14 -19
  26. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-transaction-history/.stencil/packages/stencil/user-transaction-history/stencil.config.d.ts +2 -0
  27. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-transaction-history/.stencil/packages/stencil/user-transaction-history/stencil.config.dev.d.ts +2 -0
  28. package/dist/types/components/internal/filters.d.ts +4 -4
  29. package/dist/types/components/internal/page-size.d.ts +4 -4
  30. package/dist/types/components/internal/table.d.ts +2 -2
  31. package/dist/types/components/user-transaction-history/index.d.ts +1 -0
  32. package/dist/types/components/user-transaction-history/user-transaction-history.d.ts +37 -37
  33. package/dist/types/contracts/translation.d.ts +2 -2
  34. package/dist/types/models/transactions-response.model.d.ts +17 -17
  35. package/dist/types/stencil-public-runtime.d.ts +142 -33
  36. package/dist/types/utils/currency.utils.d.ts +2 -2
  37. package/dist/types/utils/date.util.d.ts +2 -2
  38. package/dist/types/utils/locale.util.d.ts +38 -38
  39. package/dist/types/utils/utils.d.ts +1 -0
  40. package/dist/user-transaction-history/p-57173b50.js +2 -0
  41. package/dist/user-transaction-history/p-653991ac.entry.js +1 -0
  42. package/dist/user-transaction-history/p-e1255160.js +1 -0
  43. package/dist/user-transaction-history/user-transaction-history.esm.js +1 -1
  44. package/loader/cdn.js +1 -3
  45. package/loader/index.cjs.js +1 -3
  46. package/loader/index.d.ts +13 -1
  47. package/loader/index.es2017.js +1 -3
  48. package/loader/index.js +1 -3
  49. package/loader/package.json +1 -0
  50. package/package.json +8 -1
  51. package/dist/cjs/index-206e75cb.js +0 -1416
  52. package/dist/components/index.d.ts +0 -26
  53. package/dist/components/index.js +0 -1
  54. package/dist/components/user-transaction-history.d.ts +0 -11
  55. package/dist/components/user-transaction-history.js +0 -378
  56. package/dist/esm/index-32e3ae05.js +0 -1388
  57. package/dist/esm/polyfills/core-js.js +0 -11
  58. package/dist/esm/polyfills/css-shim.js +0 -1
  59. package/dist/esm/polyfills/dom.js +0 -79
  60. package/dist/esm/polyfills/es5-html-element.js +0 -1
  61. package/dist/esm/polyfills/index.js +0 -34
  62. package/dist/esm/polyfills/system.js +0 -6
  63. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/user-transaction-history/.stencil/packages/user-transaction-history/stencil.config.d.ts +0 -2
  64. package/dist/user-transaction-history/p-10b5b959.js +0 -1
  65. package/dist/user-transaction-history/p-4e4fb37e.entry.js +0 -1
@@ -1 +1 @@
1
- import '@vaadin/date-picker/theme/lumo/vaadin-date-picker.js';
1
+ import "@vaadin/date-picker/theme/lumo/vaadin-date-picker.js";
@@ -1,18 +1,18 @@
1
1
  export class CurrencyFormatter {
2
- constructor() { }
3
- static format(currency, value) {
4
- let result = `${value} ${currency}`;
5
- try {
6
- const formatter = new Intl.NumberFormat('en-US', {
7
- style: 'currency',
8
- currency: currency,
9
- });
10
- result = formatter.format(value);
2
+ constructor() { }
3
+ static format(currency, value) {
4
+ let result = `${value} ${currency}`;
5
+ try {
6
+ const formatter = new Intl.NumberFormat('en-US', {
7
+ style: 'currency',
8
+ currency: currency,
9
+ });
10
+ result = formatter.format(value);
11
+ }
12
+ catch (_a) {
13
+ // If we here formatter do not support that currency.
14
+ // Just ignore that and use the currency name instead of it symbol.
15
+ }
16
+ return result;
11
17
  }
12
- catch (_a) {
13
- // If we here formatter do not support that currency.
14
- // Just ignore that and use the currency name instead of it symbol.
15
- }
16
- return result;
17
- }
18
18
  }
@@ -1,8 +1,8 @@
1
1
  export class DateTransformer {
2
- constructor() { }
3
- static dateToFormatedString(date) {
4
- const dateStr = date.toLocaleDateString('en-gb');
5
- const timeStr = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
6
- return `${dateStr}, ${timeStr}`;
7
- }
2
+ constructor() { }
3
+ static dateToFormatedString(date) {
4
+ const dateStr = date.toLocaleDateString('en-gb');
5
+ const timeStr = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
6
+ return `${dateStr}, ${timeStr}`;
7
+ }
8
8
  }
@@ -1,68 +1,68 @@
1
1
  export const DEFAULT_TRANSLATIONS = {
2
- "en": {
3
- "deposit": "Deposit",
4
- "withdrawals": "Withdrawals",
5
- "show": "Show",
6
- "from": "From",
7
- "to": "To",
8
- "filter": "Filter",
9
- "transactionId": "Transaction ID",
10
- "date": "Date",
11
- "amount": "Amount",
12
- "productType": "Product Type",
13
- "status": "Status",
14
- "noData": "There are no account activities"
15
- },
16
- "hr": {
17
- "deposit": "Uplate",
18
- "withdrawals": "Isplate",
19
- "show": "Prikaži",
20
- "from": "Od",
21
- "to": "Do",
22
- "filter": "Filter",
23
- "transactionId": "ID transakcije",
24
- "date": "Datum",
25
- "amount": "Iznos",
26
- "productType": "Vrsta proizvoda",
27
- "status": "Status",
28
- "noData": "Nema aktivnosti na računu"
29
- }
2
+ "en": {
3
+ "deposit": "Deposit",
4
+ "withdrawals": "Withdrawals",
5
+ "show": "Show",
6
+ "from": "From",
7
+ "to": "To",
8
+ "filter": "Filter",
9
+ "transactionId": "Transaction ID",
10
+ "date": "Date",
11
+ "amount": "Amount",
12
+ "productType": "Product Type",
13
+ "status": "Status",
14
+ "noData": "There are no account activities"
15
+ },
16
+ "hr": {
17
+ "deposit": "Uplate",
18
+ "withdrawals": "Isplate",
19
+ "show": "Prikaži",
20
+ "from": "Od",
21
+ "to": "Do",
22
+ "filter": "Filter",
23
+ "transactionId": "ID transakcije",
24
+ "date": "Datum",
25
+ "amount": "Iznos",
26
+ "productType": "Vrsta proizvoda",
27
+ "status": "Status",
28
+ "noData": "Nema aktivnosti na računu"
29
+ }
30
30
  };
31
31
  export class Localization {
32
- constructor() { }
33
- static async loadCustomTranslations(translationUrl) {
34
- try {
35
- const response = await fetch(translationUrl, {
36
- headers: {
37
- 'Content-Type': 'application/json',
38
- },
39
- });
40
- if (!response.ok) {
41
- const err = await response.text();
42
- throw new Error(err);
43
- }
44
- const translations = await response.json();
45
- Localization.updateTranslations(translations);
32
+ constructor() { }
33
+ static async loadCustomTranslations(translationUrl) {
34
+ try {
35
+ const response = await fetch(translationUrl, {
36
+ headers: {
37
+ 'Content-Type': 'application/json',
38
+ },
39
+ });
40
+ if (!response.ok) {
41
+ const err = await response.text();
42
+ throw new Error(err);
43
+ }
44
+ const translations = await response.json();
45
+ Localization.updateTranslations(translations);
46
+ }
47
+ catch (ex) {
48
+ console.error(`Failed to load translations ${translationUrl}. ${ex.message}`);
49
+ }
50
+ }
51
+ static translate(key, locale) {
52
+ var _a, _b;
53
+ const avaliableLocales = Localization.getAvaliableLanguages(locale);
54
+ return ((_b = (_a = Localization.customTranslation) === null || _a === void 0 ? void 0 : _a[avaliableLocales.customLanguage]) === null || _b === void 0 ? void 0 : _b[key]) || Localization.defaultTranslation[avaliableLocales.predefinedLanguage][key];
55
+ }
56
+ static getAvaliableLanguages(locale) {
57
+ var _a;
58
+ const customLanguage = ((_a = Localization.customLanguages) === null || _a === void 0 ? void 0 : _a.includes(locale)) ? locale : Localization.defaultLanguage;
59
+ const predefinedLanguage = Localization.supportedLanguages.includes(locale) ? locale : Localization.defaultLanguage;
60
+ return { predefinedLanguage, customLanguage };
46
61
  }
47
- catch (ex) {
48
- console.error(`Failed to load translations ${translationUrl}. ${ex.message}`);
62
+ static updateTranslations(translations) {
63
+ Localization.customLanguages = Array.from(new Set([...Localization.supportedLanguages, ...Object.keys(translations).map(k => k.toLowerCase())]));
64
+ Localization.customTranslation = translations;
49
65
  }
50
- }
51
- static translate(key, locale) {
52
- var _a, _b;
53
- const avaliableLocales = Localization.getAvaliableLanguages(locale);
54
- return ((_b = (_a = Localization.customTranslation) === null || _a === void 0 ? void 0 : _a[avaliableLocales.customLanguage]) === null || _b === void 0 ? void 0 : _b[key]) || Localization.defaultTranslation[avaliableLocales.predefinedLanguage][key];
55
- }
56
- static getAvaliableLanguages(locale) {
57
- var _a;
58
- const customLanguage = ((_a = Localization.customLanguages) === null || _a === void 0 ? void 0 : _a.includes(locale)) ? locale : Localization.defaultLanguage;
59
- const predefinedLanguage = Localization.supportedLanguages.includes(locale) ? locale : Localization.defaultLanguage;
60
- return { predefinedLanguage, customLanguage };
61
- }
62
- static updateTranslations(translations) {
63
- Localization.customLanguages = Array.from(new Set([...Localization.supportedLanguages, ...Object.keys(translations).map(k => k.toLowerCase())]));
64
- Localization.customTranslation = translations;
65
- }
66
66
  }
67
67
  Localization.defaultLanguage = 'en';
68
68
  Localization.supportedLanguages = ['en'];
@@ -0,0 +1,3 @@
1
+ export function format(first, middle, last) {
2
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
+ }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };